From bc3b21a9bb883d7a27fd101d56db82bb5c0bc20a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 22 Mar 2021 10:29:27 +0000 Subject: [PATCH] fix(vue-app): handle redirect functions in routes (#9024) closes #8979 --- packages/vue-app/template/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue-app/template/router.js b/packages/vue-app/template/router.js index f45ee8b879..e8d75e2a1d 100644 --- a/packages/vue-app/template/router.js +++ b/packages/vue-app/template/router.js @@ -51,7 +51,7 @@ import scrollBehavior from './router.scrollBehavior.js' res += firstIndent + 'path: ' + JSON.stringify(route.path) res += (route.components) ? nextIndent + 'components: {' + resMap + '\n' + baseIndent + tab + '}' : '' res += (route.component) ? nextIndent + 'component: ' + route._name : '' - res += (route.redirect) ? nextIndent + 'redirect: ' + JSON.stringify(route.redirect) : '' + res += (route.redirect) ? nextIndent + 'redirect: ' + (typeof route.redirect === 'function' ? serialize(route.redirect) : JSON.stringify(route.redirect)) : '' res += (route.meta) ? nextIndent + 'meta: ' + JSON.stringify(route.meta) : '' res += (typeof route.props !== 'undefined') ? nextIndent + 'props: ' + (typeof route.props === 'function' ? serialize(route.props) : JSON.stringify(route.props)) : '' res += (typeof route.caseSensitive !== 'undefined') ? nextIndent + 'caseSensitive: ' + JSON.stringify(route.caseSensitive) : ''