mirror of https://github.com/tc39/test262.git
Fix function-valued properties in propertyBagObserver
A property in the property bag we want to observe may be a function, in which case we don't want to treat it as a primitive and create a toPrimitiveObserver for it. (Also handle the null case, in which we should fall through to return a toPrimitiveObserver.)
This commit is contained in:
parent
4f5eb40ee0
commit
ba1e51c8e7
|
@ -1669,7 +1669,7 @@ var TemporalHelpers = {
|
|||
if (result === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (typeof result === "object") {
|
||||
if ((result !== null && typeof result === "object") || typeof result === "function") {
|
||||
return result;
|
||||
}
|
||||
return TemporalHelpers.toPrimitiveObserver(calls, result, `${formatPropertyName(key, objectName)}`);
|
||||
|
|
Loading…
Reference in New Issue