This commit is contained in:
Liang Tang 2018-05-12 08:08:15 +08:00 committed by Cassie Tarakajian
parent 7a48899862
commit 29dde4776c

View file

@ -184,7 +184,7 @@ class Editor extends React.Component {
for (let i = 0; i < this._cm.lineCount(); i += 1) { for (let i = 0; i < this._cm.lineCount(); i += 1) {
this._cm.removeLineClass(i, 'background', 'line-runtime-error'); this._cm.removeLineClass(i, 'background', 'line-runtime-error');
} }
if (this.props.runtimeErrorWarningVisible) { if (this.props.runtimeErrorWarningVisible && this._cm.getDoc().modeOption === 'javascript') {
this.props.consoleEvents.forEach((consoleEvent) => { this.props.consoleEvents.forEach((consoleEvent) => {
if (consoleEvent.method === 'error') { if (consoleEvent.method === 'error') {
if (consoleEvent.arguments.indexOf(')') > -1) { if (consoleEvent.arguments.indexOf(')') > -1) {