-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
isPlainObject node 4 vs 6 #2635
Comments
So by debugging I got to lodash/lodash.isplainobject/index.js Line 135 in 85ca1f4
typeof Ctor == 'function' is false
|
Talked to @Marsup and he can't reproduce with Joi so it is probably hapi/node |
Hi @AdriVanHoudt! If _.isPlainObject is too strict you can also try _.isObject or _.isObjectLike. |
@jdalton it is not though, I only want a "pure" object no array or function or string |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
I noticed that using hapijs
lodash.isPlainObject(request.query)
returns true on node 4 and false on node 6. I know that node 6 changed something (see nodejs/node#6055) but I would suspect it still working.request.query
is being set here https://github.com/hapijs/hapi/blob/master/lib/request.js#L199I do know
request.query
is also being validated by Joi so I'm ccing @Marsup to see if he has some insights.I hope someone knows what's up
The text was updated successfully, but these errors were encountered: