diff --git a/packages/adapter-sveltekit/src/hooks/project-init.ts b/packages/adapter-sveltekit/src/hooks/project-init.ts index f94306b74..c4a7413aa 100644 --- a/packages/adapter-sveltekit/src/hooks/project-init.ts +++ b/packages/adapter-sveltekit/src/hooks/project-init.ts @@ -336,14 +336,14 @@ const createRootLayoutFile = async ({ - {$page.data.page?.meta_title} - - {#if isFilled.keyText($page.data.page?.meta_description)} - - + {$page.data.page?.data.meta_title} + + {#if isFilled.keyText($page.data.page?.data.meta_description)} + + {/if} - {#if isFilled.image($page.data.page?.meta_image)} - + {#if isFilled.image($page.data.page?.data.meta_image)} + {/if} diff --git a/packages/adapter-sveltekit/test/plugin-project-init.test.ts b/packages/adapter-sveltekit/test/plugin-project-init.test.ts index 78833e420..8216bc6df 100644 --- a/packages/adapter-sveltekit/test/plugin-project-init.test.ts +++ b/packages/adapter-sveltekit/test/plugin-project-init.test.ts @@ -1045,19 +1045,19 @@ describe("root layout file", () => { - {$page.data.page?.meta_title} - - {#if isFilled.keyText($page.data.page?.meta_description)} - + {$page.data.page?.data.meta_title} + + {#if isFilled.keyText($page.data.page?.data.meta_description)} + {/if} - {#if isFilled.image($page.data.page?.meta_image)} + {#if isFilled.image($page.data.page?.data.meta_image)} {/if}