Skip to content

Commit cf2f11b

Browse files
author
repo-visualizer
committed
dont check root path for glob or path match
1 parent 264b40d commit cf2f11b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12822,6 +12822,8 @@ var nodePath = __toModule(require("path"));
1282212822
// src/should-exclude-path.ts
1282312823
var import_micromatch = __toModule(require_micromatch());
1282412824
var shouldExcludePath = (path, pathsToIgnore, globsToIgnore) => {
12825+
if (!path)
12826+
return false;
1282512827
return pathsToIgnore.has(path) || globsToIgnore.some((glob) => (0, import_micromatch.isMatch)(path, glob));
1282612828
};
1282712829

src/should-exclude-path.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { isMatch } from 'micromatch';
55
* path may be to a directory or individual file.
66
*/
77
export const shouldExcludePath = (path: string, pathsToIgnore: Set<string>, globsToIgnore: string[]): boolean => {
8+
if (!path) return false
89

910
return pathsToIgnore.has(path) || globsToIgnore.some(glob => isMatch(path, glob));
1011
}

0 commit comments

Comments
 (0)