Skip to content

Commit 29a3556

Browse files
authored
fix: OPTIC-1858: Wait for LSF and currentAnnotation to be available before completing task init (#7297)
1 parent 2fd6d28 commit 29a3556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/libs/datamanager/src/stores/AppStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ export const AppStore = types
239239

240240
// wait for the task to be loaded and LSF to be initialized
241241
yield taskPromise.then(async () => {
242-
// wait for self.LSF to be initialized
242+
// wait for self.LSF to be initialized with currentAnnotation
243243
let maxWait = 1000;
244-
while (!self.LSF) {
244+
while (!self.LSF?.currentAnnotation) {
245245
await new Promise((resolve) => setTimeout(resolve, 1));
246246
maxWait -= 1;
247247
if (maxWait <= 0) {

0 commit comments

Comments
 (0)