Skip to content

Commit

Permalink
fix: do not use throwError
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Aug 1, 2022
1 parent 3e369a2 commit 5d90c38
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/runtime/pages/document-driven.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<script setup lang="ts">
import { throwError } from '#app'
import { createError } from 'h3'
import { useContent, useContentHead } from '#imports'
const { page } = useContent()
// Page not found
if (!page.value) {
throwError(
createError({
statusCode: 404,
statusMessage: `Page not found: ${useRoute().path}`
})
)
throw createError({
statusCode: 404,
statusMessage: `Page not found: ${useRoute().path}`
})
}
useContentHead(page)
Expand Down

0 comments on commit 5d90c38

Please sign in to comment.