Closed knaos closed 2 years ago
Not having a prototype is intentional. All objects returned by this package don't for security reasons. It's a generally recommended practice not to use Object.prototype.hasOwnProperty
as you can never always know where objects are coming from.
https://github.com/tc39/proposal-accessible-object-hasownproperty
I understand. Thanks! Closing this issue.
"electron-store": "8.0.1" OS: Windows 10
When adding a onDidAnyChange callback, the arguments for newValue and oldValue are objects but they don't inherit from Object.prototype. When I run
Object.getPrototypeOf(newValue)
I getnull
.This effectively is misleading when trying to use methods from the Object prototype, like
Object.prototype.hasOwnProperty(key)
.I think that the arguments for the new and old values should inherit from the Object.prototype()