Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): better equality check for json cookies #6352

Merged
merged 3 commits into from Aug 4, 2022
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#14088

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In case of JSON cookies, we can perform a basic JSON.stringify equality test. I think we're not worried with deep equality or order because we are really testing to see if a write-operation has been performed on the cookie.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Aug 4, 2022
@danielroe danielroe requested a review from pi0 August 4, 2022 10:22
@danielroe danielroe self-assigned this Aug 4, 2022
@netlify
Copy link

netlify bot commented Aug 4, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit c581552
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62eba5f4abf7ef000883c560

@pi0 pi0 changed the title fix(nuxt): add basic equality checking for json cookies fix(nuxt): better equality check for json cookies Aug 4, 2022
@pi0 pi0 merged commit 4732d2c into main Aug 4, 2022
@pi0 pi0 deleted the fix/equal-cookie-object branch August 4, 2022 10:58
@pi0 pi0 mentioned this pull request Aug 5, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cookie gets rewritten on read (using useCookie)
3 participants