diff --git a/src/UI/Config.js b/src/UI/Config.js index bbc6b54ed..9770265e7 100644 --- a/src/UI/Config.js +++ b/src/UI/Config.js @@ -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)); + } } }; });