mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibJS: Remove unnecessary value_or() from get()
Object::get() never returns an empty value anymore, as per the spec, so having a value_or() fallback is no longer needed.
This commit is contained in:
parent
57f7e6e775
commit
9555ca99a0
19 changed files with 56 additions and 56 deletions
|
@ -94,7 +94,7 @@ Value Reference::get_value(GlobalObject& global_object, bool throw_if_undefined)
|
|||
auto* base_obj = m_base_value.to_object(global_object);
|
||||
if (!base_obj)
|
||||
return {};
|
||||
return base_obj->get(m_name).value_or(js_undefined());
|
||||
return base_obj->get(m_name);
|
||||
}
|
||||
|
||||
VERIFY(m_base_type == BaseType::Environment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue