• Robert Knight's avatar
    Ignore "popstate" event delivered by browser on page load · d8ac7666
    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
Name
Last commit
Last update
..
annotator Loading commit data...
boot Loading commit data...
images/icons Loading commit data...
shared Loading commit data...
sidebar Loading commit data...
styles Loading commit data...
test-util Loading commit data...
.eslintrc Loading commit data...
karma.config.js Loading commit data...
tsconfig.json Loading commit data...