You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a plain JS object that is failing the check because it has an attribute called "constructor". But it is defined as a string. This should still be considered a plain JS object.
const myPlainObj = {"code":"invalid_user_password","constructor":"Object","extras":{},"message":"invalid_user_password"};
if (isPlainObject(myPlainObj)) console.log('It is Plain');
else console.log(":(");
Okay, I see you have specifically checking for this since pretty much the beginning, and I'm guessing because there are potentially other implications of setting a field called constructor in JSON. Feel free to close this if you'd like. In my use case where I thought I needed this, I have to ignore it anyway because it messes with something else in my framework if you do this.
I have a plain JS object that is failing the check because it has an attribute called "constructor". But it is defined as a string. This should still be considered a plain JS object.
https://github.com/jonschlinkert/is-plain-object/blob/master/is-plain-object.js#L17-L19 would likely need to change.
I can create a PR if you'd like.
The text was updated successfully, but these errors were encountered: