Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant committed Dec 5, 2024
1 parent 30e909d commit 5a896e6
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,7 @@ export class PathSelectorTable {
} else if(isHidden) {
return this.showHidden;
} else if(isFile) {
if (this.filePattern !== "") {
if (file.name.match(RegExp(this.filePattern))) {
return this.showFiles;
} else {
return false;
}
}
else {
return this.showFiles;
}
return this.filteredByFilename(file);
} else {
return true;
}
Expand All @@ -236,4 +227,17 @@ export class PathSelectorTable {
data.files = filteredFiles;
return data;
}

filteredByFilename(file) {
if (this.filePattern !== "") {
if (file.name.match(RegExp(this.filePattern))) {
return this.showFiles;
} else {
return false;
}
}
else {
return this.showFiles;
}
}
}

0 comments on commit 5a896e6

Please sign in to comment.