mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibJS: Fix crash when printing error for missing class extends value prototype
If it's missing we get an empty value, but we can't use that with to_string_without_side_effects() so we have to use undefined as the default. Fixes #5142.
This commit is contained in:
parent
803a20fa86
commit
509e5a3045
1 changed files with 1 additions and 1 deletions
|
@ -818,7 +818,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);
|
||||
auto super_constructor_prototype_value = super_constructor.as_object().get(vm.names.prototype).value_or(js_undefined());
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
if (!super_constructor_prototype_value.is_object() && !super_constructor_prototype_value.is_null()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue