Skip to content

Commit 8542830

Browse files
committed
Update user.ts
1 parent 26a240e commit 8542830

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/models/user.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,16 @@ export default class UserModel extends AbstractModel<UserDBScheme> implements Us
371371
const res = [];
372372

373373
if (ids.length === 0) {
374+
if (!this.workspaces) {
375+
return [];
376+
}
374377
return Object.keys(this.workspaces);
375378
}
376379

380+
if (!this.workspaces) {
381+
return [];
382+
}
383+
377384
for (const id of ids) {
378385
const workspaceId = id.toString();
379386
const workspace = this.workspaces[workspaceId];

0 commit comments

Comments
 (0)