Unverified Commit 92fe9d3e authored by NGPixel's avatar NGPixel

fix: view source of page version crash (#3297)

parent 68fc51ad
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
this.$store.commit('page/SET_MODE', 'source') this.$store.commit('page/SET_MODE', 'source')
if (this.effectivePermissions) { if (this.effectivePermissions) {
this.$store.set('page/effectivePermissions',JSON.parse(Buffer.from(this.effectivePermissions, 'base64').toString())) this.$store.set('page/effectivePermissions', JSON.parse(Buffer.from(this.effectivePermissions, 'base64').toString()))
} }
}, },
methods: { methods: {
...@@ -86,6 +86,7 @@ export default { ...@@ -86,6 +86,7 @@ export default {
.source { .source {
pre > code { pre > code {
box-shadow: none; box-shadow: none;
background-color: transparent;
color: mc('grey', '800'); color: mc('grey', '800');
font-family: 'Roboto Mono', sans-serif; font-family: 'Roboto Mono', sans-serif;
font-weight: 400; font-weight: 400;
......
...@@ -372,7 +372,8 @@ router.get(['/s', '/s/*'], async (req, res, next) => { ...@@ -372,7 +372,8 @@ router.get(['/s', '/s/*'], async (req, res, next) => {
page: { page: {
...page, ...page,
...pageVersion ...pageVersion
} },
effectivePermissions
}) })
} else { } else {
_.set(res.locals, 'pageMeta.title', page.title) _.set(res.locals, 'pageMeta.title', page.title)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment