Skip to content

Commit

Permalink
Fix issue crash app when edit environment
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenbavinh-decathlon committed Dec 27, 2023
1 parent 5ca7f6b commit e49999b
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 e49999b

Please sign in to comment.