Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Moureton committed Mar 15, 2024
1 parent caac4b9 commit a42ab1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/useWpPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a42ab1a

Please sign in to comment.