diff options
Diffstat (limited to 'Libraries/LibJS/Runtime/StringConstructor.cpp')
-rw-r--r-- | Libraries/LibJS/Runtime/StringConstructor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Runtime/StringConstructor.cpp b/Libraries/LibJS/Runtime/StringConstructor.cpp index 258b144465..b8c4e3592f 100644 --- a/Libraries/LibJS/Runtime/StringConstructor.cpp +++ b/Libraries/LibJS/Runtime/StringConstructor.cpp @@ -87,7 +87,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw) auto raw = template_object->get("raw"); if (vm.exception()) return {}; - if (raw.is_empty() || raw.is_undefined() || raw.is_null()) { + if (raw.is_empty() || raw.is_nullish()) { vm.throw_exception<TypeError>(global_object, ErrorType::StringRawCannotConvert, raw.is_null() ? "null" : "undefined"); return {}; } |