From d3104b8675d8ba16d3756d8ba9a0017258e348a7 Mon Sep 17 00:00:00 2001 From: Sid Date: Tue, 21 Nov 2023 09:28:58 +0800 Subject: [PATCH] fix: Page missing og:image --- packages/karbon/src/runtime/composables/seo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/karbon/src/runtime/composables/seo.ts b/packages/karbon/src/runtime/composables/seo.ts index 3a30567e..6a6f0c21 100644 --- a/packages/karbon/src/runtime/composables/seo.ts +++ b/packages/karbon/src/runtime/composables/seo.ts @@ -1,4 +1,4 @@ -import { compact, first, identity, map, pathOr, pipe } from 'remeda' +import { compact, filter, first, identity, map, pathOr, pipe } from 'remeda' import type { PartialDeep } from 'type-fest' import type { MetaFlatInput } from '@zhead/schema' import type { MaybeRefOrGetter } from '@vueuse/core' @@ -41,6 +41,7 @@ function createFirstFound(paths: string[][]) { paths, map((p) => path(input, p)), compact, + filter(Boolean), first(), ) }