ensure errors Array is always present in compiler output

This commit is contained in:
Evan You 2017-02-24 11:14:36 -05:00
parent bc034d33a4
commit 394679fc70

View File

@ -58,6 +58,8 @@ export function compile (
})
if (process.env.NODE_ENV !== 'production') {
compiled.errors = errors.concat(detectErrors(compiled.ast))
} else {
compiled.errors = errors
}
return compiled
}