mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix crash in MonacoEditor
- The crash reported was never observed Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
bcd889999d
commit
720eda2bb1
@ -94,7 +94,8 @@ class NonInjectedMonacoEditor extends React.Component<MonacoEditorProps & Depend
|
|||||||
|
|
||||||
const { language, value } = this.props;
|
const { language, value } = this.props;
|
||||||
|
|
||||||
return editor.createModel(value, language, uri);
|
// NOTE: if for some reason `value` is not typeof "string" then the following line can throw.
|
||||||
|
return editor.createModel(String(value), language, uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@computed get options(): editor.IStandaloneEditorConstructionOptions {
|
@computed get options(): editor.IStandaloneEditorConstructionOptions {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user