From 92fe9d3e31b38c989a173e9afbbb5f6093095855 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Mon, 10 Jan 2022 17:16:14 -0500 Subject: [PATCH] fix: view source of page version crash (#3297) --- client/components/source.vue | 3 ++- server/controllers/common.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/source.vue b/client/components/source.vue index 79bc08de..6da6906a 100644 --- a/client/components/source.vue +++ b/client/components/source.vue @@ -67,7 +67,7 @@ export default { this.$store.commit('page/SET_MODE', 'source') 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: { @@ -86,6 +86,7 @@ export default { .source { pre > code { box-shadow: none; + background-color: transparent; color: mc('grey', '800'); font-family: 'Roboto Mono', sans-serif; font-weight: 400; diff --git a/server/controllers/common.js b/server/controllers/common.js index 03b931ef..65f8b2d8 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -372,7 +372,8 @@ router.get(['/s', '/s/*'], async (req, res, next) => { page: { ...page, ...pageVersion - } + }, + effectivePermissions }) } else { _.set(res.locals, 'pageMeta.title', page.title)