make proxystorage return null instead of undefined
This commit is contained in:
parent
52c4114148
commit
d862285c63
16
js/main.js
16
js/main.js
|
@ -26,7 +26,7 @@
|
|||
this.save();
|
||||
};
|
||||
__ls.getItem = function(i) {
|
||||
return __ls[i];
|
||||
return __ls[i] || null;
|
||||
};
|
||||
__ls.save = function() {
|
||||
__fs.writeFileSync("localStorage.json", JSON.stringify(this), null, 4);
|
||||
|
@ -38,7 +38,7 @@
|
|||
__ls.save();
|
||||
},
|
||||
get: function(target, name, receiver) {
|
||||
return __ls[name];
|
||||
return __ls[name] || null;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -46,18 +46,6 @@
|
|||
|
||||
})();
|
||||
|
||||
|
||||
var g = Object;
|
||||
var p = new Proxy(g, {
|
||||
set: function(target,name,val,receiver) {
|
||||
console.log(target);
|
||||
console.log(name);
|
||||
console.log(val);
|
||||
console.log(receiver);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
window.bdStorage = {};
|
||||
window.bdStorage.get = function(i) {
|
||||
return betterDiscordIPC.sendSync('synchronous-message', { 'arg': 'storage', 'cmd': 'get', 'var': i });
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue