Skip to content

Commit

Permalink
Throw 404 on missing comp
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed Aug 8, 2023
1 parent 5308f76 commit 9b5d059
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pages/[...permalink].vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const pageFilter = computed(() => {
return { permalink: { _eq: finalPath } };
});
const { data: page, error } = await useAsyncData(
const { data: page } = await useAsyncData(
path,
() => {
return $directus.request(
Expand Down Expand Up @@ -45,8 +45,7 @@ const { data: page, error } = await useAsyncData(
);
if (!unref(page)) {
console.log(unref(error));
// throw createError({ statusCode: 404, statusMessage: 'Page Not Found' });
throw createError({ statusCode: 404, statusMessage: 'Page Not Found' });
}
useHead({
Expand Down

0 comments on commit 9b5d059

Please sign in to comment.