-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
6.x querystring.parse returns object for which instanceof Object is false (was true for 4.x) #8737
Comments
This was an intended change. The object returned by See #6055 and https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#querystring |
Basicly this happens because |
You should check for |
So,
As @claudiorodriguez pointed out you should use |
The affected code is in a 3rd-party module which I guess we will have to pull into our project to fix. This seems like a very silly code-breakage that would have been an easy fix in querystring.parse to make it behave as before. Thanks for the information. |
Something tells me you didn't actually read through #6055. |
You are correct. Sorry about that. I get it now. Thanks to everyone that commented and helped me to understand. |
No problem, glad it got cleared up. |
Linux ip-10-0-0-35.localdomain 3.10.0-229.14.1.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Here is a snippet that demos the problem:
On 4.4.4 prints:
{"languageId":"en-US"} object
params instanceof Object is true
On 6.3.1 and 6.6.0 prints:
{"languageId":"en-US"} object
params instanceof Object is false
The text was updated successfully, but these errors were encountered: