TypeScript
TypeScript copied to clipboard
RangeError: Maximum call stack size exceeded
Bug Report
Originally posted by @clhiker in https://github.com/swc-project/swc/issues/5433
🔎 Search Terms
- generators
- JSON.stringify
- enumerable
🕗 Version & Regression Information
- This is a crash on runtime
⏯ Playground Link
Playground link with relevant code
💻 Code
let v1 = {
a: { id: 1 },
b: []
};
function* v2(v1) {
try {
} catch (v1) {
}
}
const v3 = JSON.stringify(v1, v2);
🙁 Actual behavior
It crashes on runtime.
🙂 Expected behavior
run without crash. and v3 === {}