Skip to content

Commit bb4f349

Browse files
LinusBorghaoqunjiang
authored andcommittedMar 6, 2019
fix: proxy should warn when array is passed. (#3525)
close #3524
1 parent 4c91f8d commit bb4f349

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/@vue/cli-service/lib/util/prepareProxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function prepareProxy (proxy, appPublicFolder) {
2727
if (!proxy) {
2828
return undefined
2929
}
30-
if (typeof proxy !== 'object' && typeof proxy !== 'string') {
30+
if (Array.isArray(proxy) || (typeof proxy !== 'object' && typeof proxy !== 'string')) {
3131
console.log(
3232
chalk.red(
3333
'When specified, "proxy" in package.json must be a string or an object.'

0 commit comments

Comments
 (0)