nuxt / nuxt

The Intuitive Vue Framework.

Home Page:https://nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decode function for useCookie called for every cookie present

Eazash opened this issue · comments

Environment

  • Operating System: Darwin
  • Node Version: v20.10.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@9.0.6
  • Builder: -
  • User Config: devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  1. Call useCookie more than once with unique cookie names.
  2. Add a decode function to at least one of the calls

Describe the bug

The decode function is called with the values for all cookies present, while the expected behaviour is for the function to be called with the value for the cookie name the hook was registered with.

image Reproduction:

Additional context

No response

Logs

No response