summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/StringConstructor.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/Runtime/StringConstructor.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/Runtime/StringConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringConstructor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
index 36cdb96c78..cc336f4def 100644
--- a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
@@ -78,7 +78,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw)
if (vm.exception())
return {};
- auto raw_value = cooked->get(vm.names.raw).value_or(js_undefined());
+ auto raw_value = cooked->get(vm.names.raw);
if (vm.exception())
return {};