diff options
author | Linus Groh <mail@linusgroh.de> | 2021-07-04 22:55:45 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-05 00:03:25 +0200 |
commit | 9555ca99a032c764e659452b09d664bd4f68fd10 (patch) | |
tree | ca6270d6b99a4a6728e12f3077f7b89e1d05d9a3 /Userland/Libraries/LibJS/AST.cpp | |
parent | 57f7e6e7755d2da6f455ddeb7855bd5d80175dfa (diff) | |
download | serenity-9555ca99a032c764e659452b09d664bd4f68fd10.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/AST.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/AST.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp index 79d93b1bea..0b95c3476c 100644 --- a/Userland/Libraries/LibJS/AST.cpp +++ b/Userland/Libraries/LibJS/AST.cpp @@ -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()) { |