Skip to content
Snippets Groups Projects
Commit cb842625 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

fix: unexistent projects key on user

parent 81de947e
No related branches found
No related tags found
1 merge request!145fix: unexistent projects key on user
Pipeline #12426 passed
...@@ -39,7 +39,7 @@ converse.plugins.add('sib-subscribe-to-rai', { ...@@ -39,7 +39,7 @@ converse.plugins.add('sib-subscribe-to-rai', {
let projects = []; let projects = [];
const user = await document.querySelector('sib-auth').getUser(); const user = await document.querySelector('sib-auth').getUser();
const userProfile = await store.getData(user['@id'], this.context); const userProfile = await store.getData(user['@id'], this.context);
if (userProfile && userProfile['projects.ldp:contains'] !== 'undefined') { if (userProfile && await userProfile['projects.ldp:contains'] !== 'undefined') {
for (let projectMembership of await userProfile['projects.ldp:contains']) { for (let projectMembership of await userProfile['projects.ldp:contains']) {
if (projectMembership) { if (projectMembership) {
projects.push(await projectMembership['project.jabberID']); projects.push(await projectMembership['project.jabberID']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment