typo: Simplify child.children sanitization

This commit is contained in:
Sebastien Chopin 2017-08-25 13:54:14 +02:00
parent 7bc1b35b21
commit 378d116bf8

View File

@ -219,9 +219,7 @@ export function createRoutes (files, srcDir) {
route.chunkName = file.replace(/\.vue$/, '')
let child = _.find(parent, { name: route.name })
if (child) {
if (!child.children) {
child.children = []
}
child.children = child.children || []
parent = child.children
route.path = ''
} else {