Fix crash in MonacoEditor

- The crash reported was never observed

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-07-05 14:01:58 -04:00
1 parent bcd889999d
commit 720eda2bb1
1 file changed
+2 -1
@@ -94,7 +94,8 @@ class NonInjectedMonacoEditor extends React.Component<MonacoEditorProps & Depend
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 {