Skip to content

Commit

Permalink
fix: entry filter invalid on window
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Oct 10, 2018
1 parent 4137895 commit fc0d8c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ utils.isMatch = (regexArray, strMatch) => {
if (!regexArray) {
return false;
}
// fix window path seperate \\
const normalizeStrMatch = strMatch.replace(/\\/g, '/');
regexArray = Array.isArray(regexArray) ? regexArray : [regexArray];
return regexArray.some(item => new RegExp(item, '').test(strMatch));
return regexArray.some(item => new RegExp(item, '').test(normalizeStrMatch));
};

utils.assetsPath = (prefix, filepath) => path.posix.join(prefix, filepath);
Expand Down

0 comments on commit fc0d8c4

Please sign in to comment.