summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-07-04 22:55:45 +0100
committerAndreas Kling <kling@serenityos.org>2021-07-05 00:03:25 +0200
commit9555ca99a032c764e659452b09d664bd4f68fd10 (patch)
treeca6270d6b99a4a6728e12f3077f7b89e1d05d9a3 /Userland/Libraries/LibJS/AST.cpp
parent57f7e6e7755d2da6f455ddeb7855bd5d80175dfa (diff)
downloadserenity-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.cpp2
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()) {