From 457984a56740962d6cbf0b07903f065732d03ef9 Mon Sep 17 00:00:00 2001 From: SlayerOfTheBad <38011415+SlayerOfTheBad@users.noreply.github.com> Date: Wed, 11 Aug 2021 14:33:02 +0200 Subject: [PATCH] fix(vue-app): serialize route meta to allow functions (#9634) Co-authored-by: Jacob --- 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 6c3d6a50f0f3..795a1b9f1bb8 100644 --- a/packages/vue-app/template/router.js +++ b/packages/vue-app/template/router.js @@ -52,7 +52,7 @@ import scrollBehavior from './router.scrollBehavior.js' res += (route.components) ? nextIndent + 'components: {' + resMap + '\n' + baseIndent + tab + '}' : '' res += (route.component) ? nextIndent + 'component: ' + route._name : '' 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 += (route.meta) ? nextIndent + 'meta: ' + serialize(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) : '' res += (route.alias) ? nextIndent + 'alias: ' + JSON.stringify(route.alias) : ''