Skip to content

Commit

Permalink
fix(nuxt): use event.node.req in cookie utility (#20474)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandrewluca committed Apr 24, 2023
1 parent fd281f2 commit ea1c5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/composables/cookie.ts
Expand Up @@ -60,7 +60,7 @@ export function useCookie <T = string | null | undefined> (name: string, _opts?:

function readRawCookies (opts: CookieOptions = {}): Record<string, string> | undefined {
if (process.server) {
return parse(useRequestEvent()?.req.headers.cookie || '', opts)
return parse(useRequestEvent()?.node.req.headers.cookie || '', opts)
} else if (process.client) {
return parse(document.cookie, opts)
}
Expand Down

0 comments on commit ea1c5b2

Please sign in to comment.