function proxify (instance: MemoryStorage) {
return new Proxy(instance, {
set: function (obj, prop: string | symbol, value) {
- if (MemoryStorage.prototype.hasOwnProperty(prop)) {
+ if (Object.prototype.hasOwnProperty.call(MemoryStorage, prop)) {
// FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863
instance[prop as any] = value
} else {
return true
},
get: function (target, name: string | symbol | number) {
- if (MemoryStorage.prototype.hasOwnProperty(name)) {
+ if (Object.prototype.hasOwnProperty.call(MemoryStorage, name)) {
// FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863
return instance[name as any]
}