Brett Zamir
2019-10-22 04:54:56 +08:00
committed by Adam Reis
parent c2cf33dbbf
commit 8a01d383b0

View File

@@ -33,7 +33,7 @@ options.files = files.reduce((files, file) => {
//If the isRegex flag is passed, convert the from parameter to a RegExp object
if (isRegex) {
const flags = from.replace(/.*\/([gimy]*)$/, '$1');
const flags = from.replace(/.*\/([gimyus]*)$/, '$1');
const pattern = from.replace(new RegExp(`^/(.*?)/${flags}$`), '$1');
try {
options.from = new RegExp(pattern, flags);