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

polyfill causing an issue with Next.JS 14 #239

Open
AChangXD opened this issue Aug 25, 2024 · 0 comments
Open

polyfill causing an issue with Next.JS 14 #239

AChangXD opened this issue Aug 25, 2024 · 0 comments

Comments

@AChangXD
Copy link

I'm using this library in Next.JS 14's API route handler, and the polyfill is causing an issue where it would completely crash the application with the error:

TypeError: Cannot destructure property 'protocol' of 'window.location' as it is undefined. at getLocationOrigin

I can comment out the polyfill and things will work. Is there a way to automatically detect if the package is being used in NextJS and do not perform the polyfill?

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

No branches or pull requests

1 participant