• 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
.github Loading commit data...
docs Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
yarn.lock Loading commit data...