diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index e183767c..b8088996 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -187,9 +187,11 @@ class Editor extends React.Component { if (this.props.runtimeErrorWarningVisible) { this.props.consoleEvents.forEach((consoleEvent) => { if (consoleEvent.method === 'error') { - const n = consoleEvent.arguments.replace(')', '').split(' '); - const lineNumber = parseInt(n[n.length - 1], 10) - 1; - this._cm.addLineClass(lineNumber, 'background', 'line-runtime-error'); + if (consoleEvent.arguments.indexOf(')') > -1) { + const n = consoleEvent.arguments.replace(')', '').split(' '); + const lineNumber = parseInt(n[n.length - 1], 10) - 1; + this._cm.addLineClass(lineNumber, 'background', 'line-runtime-error'); + } } }); }