Steven Silvester пре 7 година
родитељ
комит
5e2da172d0
1 измењених фајлова са 9 додато и 12 уклоњено
  1. 9 12
      jupyterlab/webpack.config.js

+ 9 - 12
jupyterlab/webpack.config.js

@@ -106,22 +106,19 @@ module.exports = {
       }
       // Limit the watched files to those in our local linked package dirs.
       var ignore = true;
-      var found = false;
-      Object.keys(localLinked).forEach(function (name) {
+      Object.keys(localLinked).some(function (name) {
         // Bail if already found.
-        if (found) {
-          return;
-        }
         var rootPath = localLinked[name];
         var contained = localPath.indexOf(rootPath + path.sep) !== -1;
-        if (localPath === rootPath || contained) {
-          found = true;
-          var rest = localPath.slice(rootPath.length);
-          if (rest.indexOf('node_modules') === -1) {
-            ignore = false;
-            maybeSync(localPath, name, rest);
-          }
+        if (localPath !== rootPath && !contained) {
+          return false;
+        }
+        var rest = localPath.slice(rootPath.length);
+        if (rest.indexOf('node_modules') === -1) {
+          ignore = false;
+          maybeSync(localPath, name, rest);
         }
+        return true;
       });
       ignoreCache.set(localPath, ignore);
       return ignore;