fix: draft finding

This commit is contained in:
DIYgod
2023-05-04 20:51:23 +01:00
parent 9daf35a586
commit efccf96736
+4 -1
View File
@@ -380,7 +380,10 @@ export async function getPage<TRender extends boolean = false>(input: {
characterId: input.characterId,
handle: input.handle,
})
const localPages = local.filter((page) => page.draftKey === input.noteId + "")
const localPages = local.filter(
(page) =>
page.draftKey === input.noteId + "" || page.draftKey === input.slug,
)
const localPage =
localPages.length &&
localPages.reduce((prev, current) => {