fix(vue-app): serialize route meta to allow functions (#9634)

Co-authored-by: Jacob <jacob@adivare.nl>
This commit is contained in:
SlayerOfTheBad 2021-08-11 14:33:02 +02:00 committed by GitHub
parent 7142497406
commit 457984a567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ import scrollBehavior from './router.scrollBehavior.js'
res += (route.components) ? nextIndent + 'components: {' + resMap + '\n' + baseIndent + tab + '}' : '' res += (route.components) ? nextIndent + 'components: {' + resMap + '\n' + baseIndent + tab + '}' : ''
res += (route.component) ? nextIndent + 'component: ' + route._name : '' 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.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.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 += (typeof route.caseSensitive !== 'undefined') ? nextIndent + 'caseSensitive: ' + JSON.stringify(route.caseSensitive) : ''
res += (route.alias) ? nextIndent + 'alias: ' + JSON.stringify(route.alias) : '' res += (route.alias) ? nextIndent + 'alias: ' + JSON.stringify(route.alias) : ''