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 f0a8211 commit 6d76864
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/adapter-sveltekit/src/hooks/project-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ const createRootLayoutFile = async ({
</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 6d76864

Please sign in to comment.