Commit c4894ec4 authored by Robert Knight's avatar Robert Knight

Set type of `store` argument to groups service

This found a mistake in the types of several references to the document
URI, which is not always present.
parent 2035a96a
......@@ -33,7 +33,7 @@ function allowLeavingGroups(settings) {
*
* @param {Group[]} userGroups - groups the user is a member of
* @param {Group[]} featuredGroups - all other groups, may include some duplicates from the userGroups
* @param {string} uri - uri of the current page
* @param {string|null} uri - uri of the current page
* @param {HostConfig} settings
*/
export function combineGroups(userGroups, featuredGroups, uri, settings) {
......@@ -69,7 +69,7 @@ export function combineGroups(userGroups, featuredGroups, uri, settings) {
/**
* @param {Group} group
* @param {string} uri
* @param {string|null} uri
*/
function isScopedToUri(group, uri) {
/* If a scope check cannot be performed, meaning:
......
......@@ -21,6 +21,7 @@ const DEFAULT_ORGANIZATION = {
};
/**
* @param {import('../store').SidebarStore} store
* @param {import('./toast-messenger').ToastMessengerService} toastMessenger
* @param {import('./auth').AuthService} auth
*/
......@@ -218,7 +219,7 @@ export default function groups(
async function loadGroupsForUserAndDocument() {
// Step 1: Get the URI of the active document, so we can fetch groups
// associated with that document.
let documentUri;
let documentUri = null;
if (store.route() === 'sidebar') {
documentUri = await getDocumentUriForGroupSearch();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment