mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
committed by
Andreas Kling
parent
57f7e6e775
commit
9555ca99a0
@@ -228,7 +228,7 @@ void VM::assign(const NonnullRefPtr<BindingPattern>& target, Value value, Global
|
||||
if (exception())
|
||||
return;
|
||||
|
||||
if (!done_property.is_empty() && done_property.to_boolean())
|
||||
if (done_property.to_boolean())
|
||||
break;
|
||||
|
||||
auto next_value = next_object->get(names.value);
|
||||
@@ -247,7 +247,7 @@ void VM::assign(const NonnullRefPtr<BindingPattern>& target, Value value, Global
|
||||
if (exception())
|
||||
return;
|
||||
|
||||
if (!done_property.is_empty() && done_property.to_boolean()) {
|
||||
if (done_property.to_boolean()) {
|
||||
iterator = nullptr;
|
||||
value = js_undefined();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user