Fix a race condition when switching language in the code app

This commit is contained in:
yflory committed 2018-01-09 12:44:25 +01:00
1 parent 65ccfe39ef
commit 77dcc1c705
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -268,11 +268,11 @@ define([
////
framework.onContentUpdate(function (newContent) {
CodeMirror.contentUpdate(newContent);
var highlightMode = newContent.highlightMode;
if (highlightMode && highlightMode !== CodeMirror.highlightMode) {
CodeMirror.setMode(highlightMode, evModeChange.fire);
}
CodeMirror.contentUpdate(newContent);
previewPane.draw();
});