Skip to content

Commit 5d0c19a

Browse files
Merge pull request #78 from oven-sh/pfg/error_stack_matching_node
Match node's error.stack behaviour
2 parents 9e3b60e + 5e99a46 commit 5d0c19a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/JavaScriptCore/runtime/ErrorInstance.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ String ErrorInstance::sanitizedNameString(JSGlobalObject* globalObject)
281281
}
282282
RETURN_IF_EXCEPTION(scope, {});
283283

284-
if (!nameValue || !nameValue.isPrimitive())
284+
if (!nameValue || !nameValue.isPrimitive() || nameValue.isUndefined())
285285
return "Error"_s;
286286
RELEASE_AND_RETURN(scope, nameValue.toWTFString(globalObject));
287287
}

0 commit comments

Comments
 (0)