fix: slug not found status
This commit is contained in:
parent
86fe9078db
commit
d58849e465
|
|
@ -316,10 +316,10 @@ export async function getPage<TRender extends boolean = false>(
|
|||
},
|
||||
})
|
||||
).data
|
||||
input.pageId = `${slug2Id.characterId}-${slug2Id.noteId}`
|
||||
if (!input.pageId) {
|
||||
if (!slug2Id?.noteId) {
|
||||
return null
|
||||
}
|
||||
input.pageId = `${slug2Id.characterId}-${slug2Id.noteId}`
|
||||
}
|
||||
|
||||
const local = getLocalPages({
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export const fetchGetPage = async (
|
|||
return null
|
||||
}
|
||||
const slug2Id = await getIdBySlug(input.page, input.site)
|
||||
input.pageId = `${slug2Id.characterId}-${slug2Id.noteId}`
|
||||
if (!input.pageId) {
|
||||
if (!slug2Id?.noteId) {
|
||||
return null
|
||||
}
|
||||
input.pageId = `${slug2Id.characterId}-${slug2Id.noteId}`
|
||||
}
|
||||
delete input.page
|
||||
return cacheGet(key, () => pageModel.getPage(input))
|
||||
|
|
|
|||
Loading…
Reference in New Issue