1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +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:
Linus Groh 2021-07-04 22:55:45 +01:00 committed by Andreas Kling
parent 57f7e6e775
commit 9555ca99a0
19 changed files with 56 additions and 56 deletions

View file

@ -884,7 +884,7 @@ Value ClassExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
Object* super_constructor_prototype = nullptr;
if (!super_constructor.is_null()) {
auto super_constructor_prototype_value = super_constructor.as_object().get(vm.names.prototype).value_or(js_undefined());
auto super_constructor_prototype_value = super_constructor.as_object().get(vm.names.prototype);
if (interpreter.exception())
return {};
if (!super_constructor_prototype_value.is_object() && !super_constructor_prototype_value.is_null()) {