From 378d116bf8ae3989fe91b04f4ae07d0e657b25b9 Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Fri, 25 Aug 2017 13:54:14 +0200 Subject: [PATCH] typo: Simplify child.children sanitization --- lib/common/utils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/common/utils.js b/lib/common/utils.js index 5b7ca14595..bd98117dca 100644 --- a/lib/common/utils.js +++ b/lib/common/utils.js @@ -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 {