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
- Call
useCookie
more than once with unique cookie names. - 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](https://private-user-images.githubusercontent.com/56728970/331122712-1f428a51-fe18-4a90-8291-44a543d8c3c2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTU5MTAzODMsIm5iZiI6MTcxNTkxMDA4MywicGF0aCI6Ii81NjcyODk3MC8zMzExMjI3MTItMWY0MjhhNTEtZmUxOC00YTkwLTgyOTEtNDRhNTQzZDhjM2MyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTE3VDAxNDEyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlYjM1OWM0NWQ0NDNhOGM4YmFjOWZlN2IxOTcxZmJmOWJiNmRiNjI0YjE0ZjczYjE3NjZlNWUwNzAxYzg5NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RFObl-KLlreB_OTPMNSjibSzb3JDEvAwSXbJRoB55p0)
Additional context
No response
Logs
No response