We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d1c63 commit ac765a1Copy full SHA for ac765a1
src/index.js
@@ -112,7 +112,7 @@ class MonacoEditor extends React.Component {
112
const { language, theme, options } = this.props;
113
const containerElement = this.refs.container; // eslint-disable-line react/no-string-refs
114
const context = this.props.context || window;
115
- if (typeof context.monaco !== 'undefined') {
+ if (containerElement && typeof context.monaco !== 'undefined') {
116
// Before initializing monaco editor
117
this.editorWillMount(context.monaco);
118
this.editor = context.monaco.editor.create(containerElement, {
0 commit comments