Skip to content

Commit 2733816

Browse files
author
sqrtthree
committed
🐛 fix(Home): Set a default value of page footer
To catch the error when page footer is not given Signed-off-by: sqrtthree <[email protected]>
1 parent 26b0115 commit 2733816

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Home.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export default {
4848
}
4949
},
5050
footer() {
51-
return md.render(this.data.footer)
51+
const defaultFooter =
52+
'Open Source on [GitHub](https://github.com/sqrthree/vuepress-theme-api), Made by [@sqrthree](https://github.com/sqrthree), Power by [vuepress](https://github.com/vuejs/vuepress).'
53+
54+
return md.render(this.data.footer || defaultFooter)
5255
},
5356
},
5457
}

0 commit comments

Comments
 (0)