enhance cm (#547)

This commit is contained in:
Mr.tang 2018-02-16 10:56:44 -06:00 committed by Cassie Tarakajian
parent 7c421d5e15
commit 0a1c8bb26f

View file

@ -181,7 +181,7 @@ class Editor extends React.Component {
if (prevProps.consoleEvents !== this.props.consoleEvents) {
this.props.showRuntimeErrorWarning();
}
for (let i = 0; i < 1000; i += 1) {
for (let i = 0; i < this._cm.lineCount(); i += 1) {
this._cm.removeLineClass(i, 'background', 'line-runtime-error');
}
if (this.props.runtimeErrorWarningVisible) {