From a42ab1a8681b4053e588364e431df6785d1e5d3e Mon Sep 17 00:00:00 2001 From: Etienne Moureton Date: Fri, 15 Mar 2024 22:23:10 +0100 Subject: [PATCH] fix --- src/runtime/composables/useWpPost.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/composables/useWpPost.ts b/src/runtime/composables/useWpPost.ts index f2fe61d..24d2e4c 100644 --- a/src/runtime/composables/useWpPost.ts +++ b/src/runtime/composables/useWpPost.ts @@ -25,7 +25,7 @@ const useWpPost = async ({ type = 'posts', id, slug }: Options = {}) => { } // @ts-ignore - return data.value as Post + return id ? data.value as Post : data.value[0] as Post } export default useWpPost