Merge pull request #414 from mouyase/fix-router-error

fix: 修复当页面前缀为空时路由错误
This commit is contained in:
tangly1024
2022-10-24 19:03:39 +08:00
committed by GitHub

View File

@@ -71,7 +71,7 @@ async function getPageProperties(id, block, schema, authToken, tagOptions, siteI
properties.status = properties.status[0]
if (properties.type === 'Post') {
properties.slug = BLOG.POST_URL_PREFIX + '/' + (properties.slug ?? properties.id)
properties.slug = `${BLOG.POST_URL_PREFIX ? BLOG.POST_URL_PREFIX + '/' : ''}` + (properties.slug ?? properties.id)
} else {
properties.slug = (properties.slug ?? properties.id)
}