mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-22 07:50:34 +01:00
fix: useClientHeaders returning an empty object
This commit is contained in:
@@ -13,13 +13,10 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
const client = trpc.createTRPCClient<AppRouter>({
|
||||
url: `${config.baseURL}${config.endpoint}`,
|
||||
headers: () => {
|
||||
if (nuxtApp.ssrContext) {
|
||||
return {
|
||||
...unref(otherHeaders),
|
||||
...headers,
|
||||
}
|
||||
return {
|
||||
...unref(otherHeaders),
|
||||
...headers,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user