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