Skip to content

Commit

Permalink
Merge pull request #2232 from Inist-CNRS/2230-button-ajout-de-données…
Browse files Browse the repository at this point in the history
…-inactif-bis

we make sure the object is usable
  • Loading branch information
touv authored Nov 29, 2024
2 parents bbb4a0b + 0cf18d5 commit e402e01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/services/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export class Progress {
}

start(tenant, { status, target, symbol, label, subLabel, type }) {
if (!this[tenant]) {
this.initialize(tenant);
}
this[tenant].status = status;
this[tenant].target = target;
this[tenant].progress = 0;
Expand All @@ -35,7 +38,7 @@ export class Progress {
}

finish(tenant) {
if (this[tenant].status === ERROR) {
if (!this[tenant] || this[tenant].status === ERROR) {
return;
}
this[tenant].status = PENDING;
Expand Down

0 comments on commit e402e01

Please sign in to comment.