Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
fix: OPTIC-218: 'Annotation saved successfully' message is NOT displa…
Browse files Browse the repository at this point in the history
…yed when user exit label stream using 'Submit and exit' option
  • Loading branch information
yyassi-heartex committed Jan 25, 2024
1 parent 003ed1d commit 4432712
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sdk/lsf-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,14 @@ export class LSFWrapper {
// don't react on duplicated annotations error
{ errorHandler: result => result.status === 409 },
);
}, false, loadNext, exitStream);
}, false, loadNext);
const status = result?.$meta?.status;

if (status === 200 || status === 201) this.datamanager.invoke("toast", { message: "Annotation saved successfully", type: "info" });
else if (status !== undefined) this.datamanager.invoke("toast", { message: "There was an error saving your Annotation", type: "error" });

if (exitStream) return this.exitStream();

};

/** @private */
Expand Down

0 comments on commit 4432712

Please sign in to comment.