Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
pi0 merged 3 commits into
mainfrom
fix/equal-cookie-object
Aug 4, 2022
Merged

fix(nuxt): better equality check for json cookies#6352
pi0 merged 3 commits into
mainfrom
fix/equal-cookie-object

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/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.

@danielroedanielroe 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 pi0August 4, 2022 10:22
@danielroedanielroe self-assigned this Aug 4, 2022
@netlify

netlifyBot commented Aug 4, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitc581552
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62eba5f4abf7ef000883c560

pi0
pi0 approved these changes Aug 4, 2022
Comment threadpackages/nuxt/src/app/composables/cookie.ts Outdated
@pi0pi0 changed the title fix(nuxt): add basic equality checking for json cookiesfix(nuxt): better equality check for json cookiesAug 4, 2022
@pi0
pi0 merged commit 4732d2c into mainAug 4, 2022
@pi0
pi0 deleted the fix/equal-cookie-object branch August 4, 2022 10:58
@pi0pi0 mentioned this pull request Aug 5, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 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

@danielroe@pi0@DamianGlowala