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
{{ message }}
Repository navigation
normalize() throws when a getter throws a Symbol or a null-prototype object #25920
normalize returns the **non-serializable** marker for all three, as its JSDoc states: "returns A normalized version of the object, or "**non-serializable**" if any errors are thrown during normalization."
Actual Result
{ ERROR: '**non-serializable** (Error: getter failed)' }
TypeError: Cannot convert a Symbol value to a string
TypeError: Cannot convert object to primitive value
The second and third calls throw out of normalize.
Additional Context
Both catch blocks in packages/core/src/utils/normalize.ts (in normalize and in stringifyValue) build the marker with a template literal, `**non-serializable** (${err})`. The template literal converts the caught value to a string. That conversion throws for a Symbol and for an object without a usable toString or Symbol.toPrimitive. The current develop branch has the same code. A conversion that cannot throw, with a fixed fallback text, would keep normalize total.
Activity
linear-code commentedon Oct 29, 2026
JS-4044
lazerg commentedon Oct 30, 2026
I want to work on it.
fix(core): stop normalize() from throwing on symbol and null-prototyp…