Skip to content

Commit 2ed4975

Browse files
committed
getAllMyGroupIds
1 parent 3ddbf0a commit 2ed4975

File tree

1 file changed

+10
-5
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+10
-5
lines changed

services/static-webserver/client/source/class/osparc/store/Groups.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,17 @@ qx.Class.define("osparc.store.Groups", {
144144
},
145145

146146
getAllMyGroupIds: function() {
147-
return [
147+
const allMyGroupIds = [
148148
this.getMyGroupId(),
149-
...this.getOrganizationIds().map(gId => parseInt(gId)),
150-
this.getEveryoneProductGroup().getGroupId(),
151-
this.getEveryoneGroup().getGroupId(),
152-
]
149+
...this.getOrganizationIds().map(gId => parseInt(gId))
150+
];
151+
if (this.getEveryoneProductGroup()) {
152+
allMyGroupIds.push(this.getEveryoneProductGroup().getGroupId());
153+
}
154+
if (this.getEveryoneGroup()) {
155+
allMyGroupIds.push(this.getEveryoneGroup().getGroupId());
156+
}
157+
return allMyGroupIds;
153158
},
154159

155160
getGroup: function(groupId) {

0 commit comments

Comments
 (0)