Browse Source

Work around webpack compile error.

Jason Grout 7 năm trước cách đây
mục cha
commit
fbf587fdd9
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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);
       });
     });