Просмотр исходного кода

Work around webpack compile error.

Jason Grout 7 лет назад
Родитель
Сommit
fbf587fdd9
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packages/codemirror/src/mode.ts

+ 3 - 1
packages/codemirror/src/mode.ts

@@ -96,7 +96,9 @@ namespace Mode {
 
     // Fetch the mode asynchronously.
     return new Promise<ISpec>((resolve, reject) => {
-      require([`codemirror/mode/${spec.mode}/${spec.mode}.js`], () => {
+      // An arrow function below seems to miscompile in our current webpack to
+      // invalid js.
+      require([`codemirror/mode/${spec.mode}/${spec.mode}.js`], function() {
         resolve(spec);
       });
     });