The event.newValue contains the stringified version of the store. In order to send the same value as in line 38, we need to parse it before sending it.
In my case, I was updating the token of the session in multiple tabs. It was incorrectly sending the new Viewer to each tab. The session was getting deleted.
With this change, any tab would get the updated Viewer without the user noticing
The
event.newValue
contains the stringified version of thestore
. In order to send the same value as in line 38, we need to parse it before sending it.In my case, I was updating the token of the session in multiple tabs. It was incorrectly sending the new Viewer to each tab. The session was getting deleted.
With this change, any tab would get the updated Viewer without the user noticing