From 538248a152755d644f4fa7d6e547182690d1ab92 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Wed, 11 Jan 2017 12:52:39 +0100 Subject: [PATCH] fix deleted route name for parent --- lib/build/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/build/index.js b/lib/build/index.js index cafb08514..56c6a5aa1 100644 --- a/lib/build/index.js +++ b/lib/build/index.js @@ -262,7 +262,9 @@ function cleanChildrenRoutes (routes, isChild = false) { } route.name = route.name.replace(/-index$/, '') if (route.children) { - delete route.name + if (route.children.find((child) => child.path === '')) { + delete route.name + } route.children = cleanChildrenRoutes(route.children, true) } })