Browse Source

Merge pull request #9641 from theorm/bugfix/path

Renamed variable that clashed with a module
Steven Silvester 4 years ago
parent
commit
089af70127
1 changed files with 9 additions and 9 deletions
  1. 9 9
      dev_mode/webpack.config.js

+ 9 - 9
dev_mode/webpack.config.js

@@ -130,29 +130,29 @@ function maybeSync(localPath, name, rest) {
  * in a package contained by the Jupyterlab repo. Used to ignore
  * files during a `--watch` build.
  */
-function ignored(path) {
-  path = path.resolve(path);
-  if (path in ignoreCache) {
+function ignored(checkedPath) {
+  checkedPath = path.resolve(checkedPath);
+  if (checkedPath in ignoreCache) {
     // Bail if already found.
-    return ignoreCache[path];
+    return ignoreCache[checkedPath];
   }
 
   // Limit the watched files to those in our local linked package dirs.
   let ignore = true;
   Object.keys(watched).some(name => {
     const rootPath = watched[name];
-    const contained = path.indexOf(rootPath + path.sep) !== -1;
-    if (path !== rootPath && !contained) {
+    const contained = checkedPath.indexOf(rootPath + path.sep) !== -1;
+    if (checkedPath !== rootPath && !contained) {
       return false;
     }
-    const rest = path.slice(rootPath.length);
+    const rest = checkedPath.slice(rootPath.length);
     if (rest.indexOf('node_modules') === -1) {
       ignore = false;
-      maybeSync(path, name, rest);
+      maybeSync(checkedPath, name, rest);
     }
     return true;
   });
-  ignoreCache[path] = ignore;
+  ignoreCache[checkedPath] = ignore;
   return ignore;
 }