Skip to content

Commit

Permalink
Merge pull request #1285 from nguyenbavinh-decathlon/bugfix/914_crash…
Browse files Browse the repository at this point in the history
…_app_when_set_env

fix(#914): Issue crash app when update environment variable
  • Loading branch information
helloanoop authored Dec 27, 2023
2 parents 5ca7f6b + e49999b commit d6f6032
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bruno-app/src/components/SingleLineEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class SingleLineEditor extends Component {
}
});
}
this.editor.setValue(this.props.value || '');
this.editor.setValue(String(this.props.value) || '');
this.editor.on('change', this._onEdit);
this.addOverlay();
}
Expand Down Expand Up @@ -151,8 +151,8 @@ class SingleLineEditor extends Component {
this.editor.setOption('theme', this.props.theme === 'dark' ? 'monokai' : 'default');
}
if (this.props.value !== prevProps.value && this.props.value !== this.cachedValue && this.editor) {
this.cachedValue = this.props.value;
this.editor.setValue(this.props.value || '');
this.cachedValue = String(this.props.value);
this.editor.setValue(String(this.props.value) || '');
}
this.ignoreChangeEvent = false;
}
Expand Down

0 comments on commit d6f6032

Please sign in to comment.