Skip to content

Commit

Permalink
fix(adapter-sveltekit): og meta null check
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jan 3, 2025
1 parent 6d76864 commit 71f0159
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions packages/adapter-sveltekit/test/plugin-project-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1045,14 +1045,20 @@ describe("root layout file", () => {
</script>
<svelte:head>
<title>{$page?.data.title}</title>
<meta property=\\"og:title\\" content={$page?.data.title} />
{#if isFilled.keyText($page?.data.meta_description)}
<meta name=\\"description\\" content={$page.data.meta_description} />
<meta property=\\"og:description\\" content={$page.data.meta_description} />
<title>{$page.data.page?.meta_title}</title>
<meta property=\\"og:title\\" content={$page.data.page?.meta_title} />
{#if isFilled.keyText($page.data.page?.meta_description)}
<meta name=\\"description\\" content={$page.data.page.meta_description} />
<meta
property=\\"og:description\\"
content={$page.data.page.meta_description}
/>
{/if}
{#if isFilled.image($page?.data.meta_image)}
<meta property=\\"og:image\\" content={asImageSrc($page.data.meta_image)} />
{#if isFilled.image($page.data.page?.meta_image)}
<meta
property=\\"og:image\\"
content={asImageSrc($page.data.page.meta_image)}
/>
{/if}
</svelte:head>
<slot />
Expand Down

0 comments on commit 71f0159

Please sign in to comment.