strange bug - Store state is leaking across clients
[issue link]The state injected by nuxt to the nuxtServerInit contains data from other client
Reproductions:
- Go to the page with BROWSER_1
- Click on “Click”, you will see random number XXX
- Close BROWSER_1
- Open BROWSER_1 and go to the same page.
- You will see number XXX generated previously (this is ok - was read from the cookie)
- Close BROWSER_1
- Open BROWSER_2 (or use incognito)
- Go the the same page. You will see number XXX that was generated for the first user!!
You can check log console in glitch.
async nuxtServerInit ({ state, dispatch, commit }, { req }) {
console.log('actions.nuxtServerInit state = ', state)
[...]
This output the state from the previous client.
Page:
https://nuxt-rc6-store-state.glitch.me/
Code:
https://glitch.com/edit/#!/join/5d93dc85-6bb8-4d6c-a604-23dbf803eca5