You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When object passed to Object.toJSON() has cyclic references, function Str() throws error with unclear and uninformative default message (e.g. in Opera Unhandled Error: Incorrect value to a primitive operation):
for (var i = 0, length = stack.length; i < length; i++) {
if (stack[i] === value) { throw new TypeError(); }
}
something pointing to reason of exception like
for (var i = 0, length = stack.length; i < length; i++) {
if (stack[i] === value) {
throw new TypeError("Cyclic reference to '" + value + "' in object");
}
}
would be much better. Also it is harder to debug code when entire expression if (...) {...} is written on single line - impossible without conditional breakpoint.
The text was updated successfully, but these errors were encountered:
previous lighthouse ticket #1283
by Victor
When object passed to Object.toJSON() has cyclic references, function Str() throws error with unclear and uninformative default message (e.g. in Opera Unhandled Error: Incorrect value to a primitive operation):
something pointing to reason of exception like
would be much better. Also it is harder to debug code when entire expression if (...) {...} is written on single line - impossible without conditional breakpoint.
The text was updated successfully, but these errors were encountered: