Skip to content
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

Check for Event object with getConstructorName during worker serialization #328

Merged
merged 4 commits into from
Jan 5, 2023

Conversation

erxclau
Copy link
Contributor

@erxclau erxclau commented Dec 20, 2022

This fixes #284 and also fixes #313 and also fixes #178.

A previous PR (#269) tried checking if the object to serialize for the worker was an Event using obj instanceof Event. However, this was failing for some reason. I changed the check to use getConstructorName.

I did some brief testing on a Next app using the build output and the deprecation warning doesn't appear anymore.

@vercel
Copy link

vercel bot commented Dec 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
partytown ✅ Ready (Inspect) Visit Preview Dec 24, 2022 at 7:22AM (UTC)

@erxclau erxclau changed the title Check for Event object with Symbol.toStringTag Check for Event object with Symbol.toStringTag during worker serialization Dec 20, 2022
@erxclau erxclau changed the title Check for Event object with Symbol.toStringTag during worker serialization Check for Event object with getConstructorName during worker serialization Dec 20, 2022
@adamdbradley
Copy link
Contributor

Great fix, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants