Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if cookies is an array #1353

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

manupit
Copy link
Contributor

@manupit manupit commented Dec 2, 2021

No description provided.

@bmulholland
Copy link
Contributor

Why is this needed?

@manupit
Copy link
Contributor Author

manupit commented Jan 5, 2022

Because cookies can be a string and unshift accepts only array

@bmulholland
Copy link
Contributor

I mean at a higher level: When is it a string? When is it an array? Why?

@gaetansenn
Copy link
Member

Hello @bmulholland we get a string value from the SSR side

We don't really know why from our side it is a string and no have time to investigate more.
But look's like this is not something new as you can see from the react library
nextauthjs/next-auth#395

@pi0 you don't agree with this fix ?

Regards,

Gaetan

@bmulholland
Copy link
Contributor

Thanks for the additional detail and the link. Looks like this is an untyped return value, and I think it happens when there's only one cookie to set (instead of multiple cookies).

@bmulholland bmulholland merged commit 723645a into nuxt-community:dev Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants