diff --git a/packages/taro-cli/src/weapp.js b/packages/taro-cli/src/weapp.js index a79202e454f5..9cfb5b77781c 100644 --- a/packages/taro-cli/src/weapp.js +++ b/packages/taro-cli/src/weapp.js @@ -1860,7 +1860,7 @@ function copyFiles () { if (fs.existsSync(from)) { const copyOptions = {} if (ignore) { - ignore = Array.isArray(ignore) || [ignore] + ignore = Array.isArray(ignore) ? ignore : [ignore] copyOptions.filter = src => { let isMatch = false ignore.forEach(iPa => {