Skip to content

Commit

Permalink
fix: view source of page version crash (#3297)
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Jan 10, 2022
1 parent 68fc51a commit 92fe9d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/components/source.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion server/controllers/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ router.get(['/s', '/s/*'], async (req, res, next) => {
page: {
...page,
...pageVersion
}
},
effectivePermissions
})
} else {
_.set(res.locals, 'pageMeta.title', page.title)
Expand Down

0 comments on commit 92fe9d3

Please sign in to comment.