diff --git a/package.json b/package.json index e137350a..4bc2f70f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hawk.api", - "version": "1.2.28", + "version": "1.2.29", "main": "index.ts", "license": "BUSL-1.1", "scripts": { diff --git a/src/models/user.ts b/src/models/user.ts index 61489d49..45fc6c17 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -371,9 +371,16 @@ export default class UserModel extends AbstractModel implements Us const res = []; if (ids.length === 0) { + if (!this.workspaces) { + return []; + } return Object.keys(this.workspaces); } + if (!this.workspaces) { + return []; + } + for (const id of ids) { const workspaceId = id.toString(); const workspace = this.workspaces[workspaceId];