You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this line of code in thecookies-next library will fail b/c res.cookies is undefined:
if(res){res.cookies.set(payload);// TypeError: Cannot read properties of undefined (reading 'set')}
Curiously enough, there's no error if I just invoke setCookie('myKey', 'myValue', { res: myResponse }); (i.e. without res). But the Response won't bear any Set-Cookie entries then. Maybe I'm just misunderstanding the behavior of the library here?
The text was updated successfully, but these errors were encountered:
If I create a new (
fetch
API)Request
in a Next.js Route Handlers, e.g.this line of code in the
cookies-next
library will fail b/cres.cookies
isundefined
:Curiously enough, there's no error if I just invoke
setCookie('myKey', 'myValue', { res: myResponse });
(i.e. withoutres
). But theResponse
won't bear anySet-Cookie
entries then. Maybe I'm just misunderstanding the behavior of the library here?The text was updated successfully, but these errors were encountered: