fix shouldIgnore only matches switch
This commit is contained in:
parent
36ad1108b4
commit
b89cf6768f
@ -114,8 +114,8 @@ export function shouldIgnore(filename, ignore, only) {
|
|||||||
if (only.length) {
|
if (only.length) {
|
||||||
var matches = false;
|
var matches = false;
|
||||||
|
|
||||||
for (var pattern of (only: Array)) {
|
for (let filename of (filenames: Array)) {
|
||||||
for (let filename of (filenames: Array)) {
|
for (var pattern of (only: Array)) {
|
||||||
if (pattern.test(filename)) {
|
if (pattern.test(filename)) {
|
||||||
matches = true;
|
matches = true;
|
||||||
break;
|
break;
|
||||||
@ -123,7 +123,7 @@ export function shouldIgnore(filename, ignore, only) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return matches;
|
return !matches;
|
||||||
} else if (ignore.length) {
|
} else if (ignore.length) {
|
||||||
for (let filename of (filenames: Array)) {
|
for (let filename of (filenames: Array)) {
|
||||||
for (var pattern of (ignore: Array)) {
|
for (var pattern of (ignore: Array)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user