1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 10:32:35 +01:00

Fixed: UI loads properly even if UI settings cannot be persisted

This commit is contained in:
Mark McDowall 2014-07-06 21:56:57 -07:00
parent 085d10851a
commit 9cafeec771

View File

@ -32,15 +32,19 @@ define(
setValue: function (key, value) {
console.log('Config: [{0}] => [{1}] '.format(key, value));
console.log('Config: [{0}] => [{1}]'.format(key, value));
if (this.getValue(key) === value.toString()) {
return;
}
window.localStorage.setItem(key, value);
vent.trigger(this.Events.ConfigUpdatedEvent, {key: key, value: value});
try {
window.localStorage.setItem(key, value);
vent.trigger(this.Events.ConfigUpdatedEvent, {key: key, value: value});
}
catch (error) {
console.error('Unable to save config: [{0}] => [{1}]'.format(key, value));
}
}
};
});