Skip to content

Commit

Permalink
Merge pull request #78 from oven-sh/pfg/error_stack_matching_node
Browse files Browse the repository at this point in the history
Match node's error.stack behaviour
  • Loading branch information
Jarred-Sumner authored Jan 15, 2025
2 parents 9e3b60e + 5e99a46 commit 5d0c19a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/runtime/ErrorInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ String ErrorInstance::sanitizedNameString(JSGlobalObject* globalObject)
}
RETURN_IF_EXCEPTION(scope, {});

if (!nameValue || !nameValue.isPrimitive())
if (!nameValue || !nameValue.isPrimitive() || nameValue.isUndefined())
return "Error"_s;
RELEASE_AND_RETURN(scope, nameValue.toWTFString(globalObject));
}
Expand Down

0 comments on commit 5d0c19a

Please sign in to comment.