-
Robert Knight authored
Fix an issue where the route was set before the initial profile and groups fetch had completed, which could result in the WebSocket connection being created and then immediately torn down and re-created on startup. The route was set too soon because Safari and Chrome emit a "popstate" event on page load, which triggered a call to `router.sync()` before the call to `sync()` made by `setupRoute` in src/sidebar/index.js after the initial profile and groups load. The solution is to only add the "popstate" listener after the initial call to `sync()`.
d8ac7666