Skip to content

Commit f85df91

Browse files
committed
🐛 fix the bug about setting next and previous article in markdown frontmatter
1 parent 9fa999b commit f85df91

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

components/MarkdownPost.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,24 @@ if (props.data?.series) {
110110
111111
// if the page metadata has the information about previous or next article
112112
// rewrite the default value
113-
if (props.data.value?.prevArticleUrl) {
113+
if (props.data?.prevArticleUrl) {
114114
// eslint-disable-next-line vue/no-setup-props-destructure
115-
prevArticleUrl.value = props.data.value.prevArticleUrl
115+
prevArticleUrl.value = props.data.prevArticleUrl
116116
}
117117
118-
if (props.data.value?.prevArticleName) {
118+
if (props.data?.prevArticleName) {
119119
// eslint-disable-next-line vue/no-setup-props-destructure
120-
prevArticleName.value = props.data.value.prevArticleName
120+
prevArticleName.value = props.data.prevArticleName
121121
}
122122
123-
if (props.data.value?.nextArticleUrl) {
123+
if (props.data?.nextArticleUrl) {
124124
// eslint-disable-next-line vue/no-setup-props-destructure
125-
nextArticleUrl.value = props.data.value.nextArticleUrl
125+
nextArticleUrl.value = props.data.nextArticleUrl
126126
}
127127
128-
if (props.data.value?.nextArticleName) {
128+
if (props.data?.nextArticleName) {
129129
// eslint-disable-next-line vue/no-setup-props-destructure
130-
nextArticleName.value = props.data.value.nextArticleName
130+
nextArticleName.value = props.data.nextArticleName
131131
}
132132
// #endregion
133133

public/default-avatar.png

123 KB
Loading

0 commit comments

Comments
 (0)