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

🐛 Bug Report — URLSearchParam type reported by toString is object instead of URLSearchParam #2750

Closed
Phoenixmatrix opened this issue Sep 19, 2024 · 0 comments · Fixed by #2771
Assignees

Comments

@Phoenixmatrix
Copy link

I believe this is a regression that may have happened a while ago.

In Cloudflare functions (eg: In Pages), if you run toString.call(new URLSearchParams()), you get [object Object].

In Nodejs, or in Chrome, the result is [object URLSearchParams]

Some libraries depend on this behavior for runtime type checking where instanceOf might not be reliable.
I believe this used to work, as I stumbled on some library that had been tested in Cloudflare worker/pages in the past and got the expected result, but it no longer does (I cannot confirm this).

Issue reproed in a Cloudflare Pages project in a Function.

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

Successfully merging a pull request may close this issue.

2 participants