mirror of https://github.com/Radarr/Radarr
Fixed: UI loads properly even if UI settings cannot be persisted
This commit is contained in:
parent
085d10851a
commit
9cafeec771
|
@ -32,15 +32,19 @@ define(
|
||||||
|
|
||||||
setValue: function (key, value) {
|
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()) {
|
if (this.getValue(key) === value.toString()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.localStorage.setItem(key, value);
|
try {
|
||||||
vent.trigger(this.Events.ConfigUpdatedEvent, {key: key, value: value});
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue