Skip to content

Commit

Permalink
fix(mixins/Tasks): behave when no user connected to API
Browse files Browse the repository at this point in the history
Introduced by 1ddbe87
  • Loading branch information
julien-f committed Aug 11, 2023
1 parent ad46bde commit 403d2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion @xen-orchestra/mixins/Tasks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class Tasks extends EventEmitter {
*
* @returns {Task}
*/
create({ name, objectId, userId = this.#app.apiContext?.user.id, type }) {
create({ name, objectId, userId = this.#app.apiContext?.user?.id, type }) {
const tasks = this.#tasks

const task = new Task({ properties: { name, objectId, userId, type }, onProgress: this.#onProgress })
Expand Down

0 comments on commit 403d2c8

Please sign in to comment.