mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +01:00
Pebble: pretend the clay-settings key is always present (but empty per default) in the localStorage
This commit is contained in:
parent
d41848014b
commit
42901a295d
@ -7,8 +7,12 @@ if (window.Storage){
|
|||||||
}).bind(Storage.prototype.setItem);
|
}).bind(Storage.prototype.setItem);
|
||||||
|
|
||||||
Storage.prototype.getItem = (function(key) {
|
Storage.prototype.getItem = (function(key) {
|
||||||
//GBjs.gbLog("I am about to return " + prefix + key);
|
// console.log("I am about to return " + prefix + key);
|
||||||
return this.call(localStorage,prefix + key);
|
var def = null;
|
||||||
|
if(key == 'clay-settings') {
|
||||||
|
def = '{}';
|
||||||
|
}
|
||||||
|
return this.call(localStorage,prefix + key) || def;
|
||||||
}).bind(Storage.prototype.getItem);
|
}).bind(Storage.prototype.getItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user