xanf / vuex-shared-mutations

Share vuex mutations between tabs/windows
MIT License
562 stars 36 forks source link

doesn't support payloads with dates #32

Open makerGeek opened 3 years ago

makerGeek commented 3 years ago

Tested using localStorage strategy.

When committing a mutation with a payload that contains a date object, the date is converted to a string in the receiving end.

This is probably due to the serialization of payload that's done before storing the payload in localStorage.

Glandos commented 3 years ago

I faced the same issue, but the solution isn't so obvious.

Since I'm using date-fns, I'm currently thinking of using number, and everything will be much simpler. Except for debugging.