feat: Deploy to Cloudflare workers
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// Resolve Node component from URI
|
||||
const { path: uri } = useRoute();
|
||||
const { data } = await useAsyncGraphQLQuery("NodeByUri", { uri });
|
||||
if (!data.value.nodeByUri) {
|
||||
if (!data.value?.nodeByUri) {
|
||||
throw createError({ statusCode: 404, message: `La page demandée est introuvable: ${uri}`, fatal: true });
|
||||
}
|
||||
const componentName = `Node${data.value.nodeByUri.__typename}`;
|
||||
@@ -14,8 +14,7 @@ useNodeSeo(data.value.nodeByUri);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="data.nodeByUri" id="page-node-from-uri">
|
||||
<div v-if="data?.nodeByUri" id="page-node-from-uri">
|
||||
<Component :is="componentName" v-bind="data.nodeByUri" />
|
||||
<pre>{{ data.nodeByUri }}</pre>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user