summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
index b7cafea214..cc5d552410 100644
--- a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
@@ -83,7 +83,7 @@ ThrowCompletionOr<void> copy_name_and_length(VM& vm, FunctionObject& function, F
// 7. If Type(targetName) is not String, set targetName to the empty String.
if (!target_name.is_string())
- target_name = js_string(vm, DeprecatedString::empty());
+ target_name = PrimitiveString::create(vm, DeprecatedString::empty());
// 8. Perform SetFunctionName(F, targetName, prefix).
function.set_function_name({ target_name.as_string().deprecated_string() }, move(prefix));