Skip to content

Commit

Permalink
Stop trying to update advanced settings autogrow textarea
Browse files Browse the repository at this point in the history
The autogrow textarea has been removed.  The attempt to update it is
causing a runtime error.  This removes that attempt (and moves a few
other lines around)

Fixes #1797
  • Loading branch information
jpevarnek committed Aug 4, 2015
1 parent 04f4bab commit 3d3c0fe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/generic_ui/polymer/advanced-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ Polymer({
checkSettings_: function(oldSettings :any, newSettings :any) {
for (var key in oldSettings){
if (!(key in newSettings)) {
this.status = StatusState.KEY_VALUE_ERROR;
return false;
}
}
for (var key in newSettings){
if (!(key in oldSettings)) {
this.status = StatusState.KEY_VALUE_ERROR;
return false;
}
}
Expand All @@ -54,14 +52,16 @@ Polymer({
setAdvancedSettings: function() {
try {
var newSettings = JSON.parse(this.settings);
if (this.checkSettings_(ui_context.model.globalSettings, newSettings)) {
ui_context.model.globalSettings = newSettings;
this.status = StatusState.SET;
ui_context.core.updateGlobalSettings(ui_context.model.globalSettings);

this.settings = this.jsonifySettings_(ui_context.model.globalSettings);
this.$.advancedSettingsPaperTextarea.update();
if (!this.checkSettings_(ui_context.model.globalSettings, newSettings)) {
this.status = StatusState.KEY_VALUE_ERROR;
return;
}

ui_context.model.globalSettings = newSettings;
this.status = StatusState.SET;
ui_context.core.updateGlobalSettings(ui_context.model.globalSettings);

this.settings = this.jsonifySettings_(ui_context.model.globalSettings);
} catch (e) {
this.status = StatusState.PARSE_ERROR;
}
Expand Down

0 comments on commit 3d3c0fe

Please sign in to comment.