Closed
Description
Logging an object with a circular reference works for as long as no property points to a function.
Without any function it works fine:
const a = { type: null, foo: 123 }
a.foo = a;
console.log(a);
...but when a function is present it fails.
const Foo = () => null;
const obj = { type: Foo, foo: null };
obj.foo = obj;
console.log(obj);
Error message:
Error while collecting browser logs: Evaluation failed: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Window'
--- property 'self' closes the circle
at JSON.stringify (<anonymous>)
at Object.serialize (<anonymous>:103:17)
at __puppeteer_evaluation_script__:2:47
Metadata
Metadata
Assignees
Labels
No labels