diff --git a/static/js/profiles.js b/static/js/profiles.js index 87e1e94..f507cd5 100644 --- a/static/js/profiles.js +++ b/static/js/profiles.js @@ -238,7 +238,10 @@ function _applyPendingProfileUsers() { if (!ids || !ids.length || !S._allUsers.length) return; const wanted = new Set(ids); // A saved google: may since have merged onto an M365 user (platform 'both') - const matches = u => wanted.has(u.id) || (u.googleEmail && wanted.has('google:' + u.googleEmail)); + // Must return a real boolean: the sidebar and getSelectedUsers() treat any + // selected value other than `false` as ticked, so an `undefined` here (users + // without googleEmail) ticked — and scanned — every M365-only/GWS-only user. + const matches = u => wanted.has(u.id) || !!(u.googleEmail && wanted.has('google:' + u.googleEmail)); S._allUsers.forEach(u => { u.selected = matches(u); }); renderAccountList(); const found = S._allUsers.filter(matches).length;