teritorio / vido

POI WebMap application
https://www.teritorio.fr/solution/webapplication-api/
GNU Affero General Public License v3.0
0 stars 0 forks source link

[Pinia] - Favorite store is buggy when multiple tabs are open #335

Open wazolab opened 2 months ago

wazolab commented 2 months ago

Store is reset once a new tab is open. The state is rehydrate but it looks like the object Map isn't properly deserialized at the end of process. Instead of having a normal JavaScript Map we have an empty object, which leads to several issue when we call Map methods later in the code.

An issue has been open on pinia-shared-state repository, but has been closed already ... : https://github.com/wobsoriano/pinia-shared-state/issues/16

Maybe we could try a new implementation of store persistance and syncronization between tab with:

More resources here: