• Robert Knight's avatar
    Only wait for document URI before fetching groups in sidebar · 233450db
    Robert Knight authored
    Fixes a regression after 36c46608 where the stream and single
    annotation page views failed to load.
    
    36c46608 made the groups service wait for the host page's document URI
    to be determined before making a call to the `/api/groups` endpoint
    passing that URI as a parameter. In the stream (`/stream`) and single
    annotation page routes, there is no host page and so
    the promise returned by `getDocumentUriForGroupSearch` never resolved.
    Avoid waiting for this URI in that case and avoid passing the
    `document_uri` parameter to the `/api/groups` endpoint.
    
    This commit introduces a new `isSidebar` test rather than using
    `annotationUI.isSidebar` because that piece of app state is not yet
    initialized at the point when `groups.load()` is called in the route's
    `resolve` function in src/sidebar/index.js.
    233450db
Name
Last commit
Last update
..
test Loading commit data...
annotations.js Loading commit data...
debug-middleware.js Loading commit data...
frames.js Loading commit data...
index.js Loading commit data...
links.js Loading commit data...
selection.js Loading commit data...
session.js Loading commit data...
util.js Loading commit data...
viewer.js Loading commit data...