mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Revert "Pebble: pretend the clay-settings key is always present (but empty per default) in the localStorage"
This reverts commit 42901a295d
.
Fixes #2720 (Setting clay-settings in localstorage to {} instead of null breaks configuration of a Pebble watchface).
This commit is contained in:
parent
f589487588
commit
ac2c714b5a
@ -20,12 +20,8 @@ if (window.Storage){
|
|||||||
}).bind(Storage.prototype.setItem);
|
}).bind(Storage.prototype.setItem);
|
||||||
|
|
||||||
Storage.prototype.getItem = (function(key) {
|
Storage.prototype.getItem = (function(key) {
|
||||||
// console.log("I am about to return " + prefix + key);
|
//GBjs.gbLog("I am about to return " + prefix + key);
|
||||||
var def = null;
|
return this.call(localStorage,prefix + key);
|
||||||
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