const Confidence = require('confidence');
const store = new Confidence.Store({ key: Object.create(null) });
console.log(store.get('/'));
And it returns the error TypeError: node.hasOwnProperty is not a function.
I have more complex scenarios that also result with the same error. The root cause is if the object does not have Object.prototype as its prototype.
As what I have found, this seems to be caused by some updates on node https://github.com/nodejs/node/issues/7223.
But the change was for query strings only so I am unsure why this was affected.
I have used the following code using node v6
And it returns the error
TypeError: node.hasOwnProperty is not a function
.I have more complex scenarios that also result with the same error. The root cause is if the object does not have
Object.prototype
as its prototype.As what I have found, this seems to be caused by some updates on node https://github.com/nodejs/node/issues/7223. But the change was for query strings only so I am unsure why this was affected.
Probably related as well. https://github.com/nodejs/node-v0.x-archive/issues/9130