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

URL parse with parseQueryString returning query object doesn't inherit Object.prototype #7223

Closed
mramos-dev opened this issue Jun 8, 2016 · 4 comments
Labels
querystring Issues and PRs related to the built-in querystring module.

Comments

@mramos-dev
Copy link

mramos-dev commented Jun 8, 2016

  • Version: 6.2.1
  • Platform: Windows Server 2012 R2 64-bit
  • Subsystem:

Calling the parse method for URL with a true parseQueryString parameter returns a query object that doesn't inherit Object.prototype. Noticed this when trying to call the hasOwnProperty prototype method on the query object an it threw a hasOwnProperty is not a function error.

@jasnell
Copy link
Member

jasnell commented Jun 8, 2016

Yes, this was an intentional change. See #6289

@jasnell jasnell closed this as completed Jun 8, 2016
@jasnell jasnell added the querystring Issues and PRs related to the built-in querystring module. label Jun 8, 2016
@esatterwhite
Copy link

Shouldn't #6289 be considered a major breaking change? It has broken code in the wild for a good number of projects. Myself included.

It effectively removed all of the object methods from the query object. That is an API change. Yes?

@bnoordhuis
Copy link
Member

@esatterwhite That is why it was landed in v6.0.0 and not in any of the v4 or v5 releases.

@esatterwhite
Copy link

esatterwhite commented Jul 16, 2016

@bnoordhuis Thanks - I didn't see any mention of it in the v6.0.0 release notes, was trying to drudge through the commit / release history.

I found it in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
querystring Issues and PRs related to the built-in querystring module.
Projects
None yet
Development

No branches or pull requests

4 participants