-
-
Notifications
You must be signed in to change notification settings - Fork 308
Unable to log circular objects with functions #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This one is pretty interesting. We handle circular references, but to serialize functions we actually create a new object with some information about the function. This way we created a new circular reference which wasn't handled properly. It's fixed in @web/[email protected] |
Woa that was quick!! 🙌 |
Getting
in some test files at export async function sendMessage(message) {
if (!message.type) {
throw new Error('Missing message type');
}
await webSocketOpened;
webSocket.send(JSON.stringify(message));
}
We should safe-stringify there |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logging an object with a circular reference works for as long as no property points to a function.
Without any function it works fine:
...but when a function is present it fails.
Error message:
The text was updated successfully, but these errors were encountered: