show 404 for draft pages
This commit is contained in:
parent
d7c27cf582
commit
c5dc1d2d19
|
|
@ -286,7 +286,7 @@ export async function getPage<TRender extends boolean = false>(
|
|||
}
|
||||
|
||||
if (!gate.allows({ type: "can-read-page", page })) {
|
||||
if (page.publishedAt > new Date()) {
|
||||
if (!page.published || page.publishedAt > new Date()) {
|
||||
throw notFound()
|
||||
} else {
|
||||
throw gate.permissionError()
|
||||
|
|
|
|||
Loading…
Reference in New Issue