fix condition being checked outside timeout callback
This commit is contained in:
parent
982aede138
commit
ecd67bc627
1 changed files with 10 additions and 10 deletions
|
|
@ -394,19 +394,19 @@ export class AccountDetailsComponent implements OnInit, OnDestroy {
|
|||
clearTimeout(this.timeoutIdQueuedAutoRefresh);
|
||||
}
|
||||
|
||||
if (this.autoRefreshReasonBlockUpdate !== null) {
|
||||
const isUpdateStillRelevant =
|
||||
this.isReceivableBlockUpdateRelevant(this.autoRefreshReasonBlockUpdate);
|
||||
|
||||
if (isUpdateStillRelevant === false) {
|
||||
this.enableRefreshesEventually();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.timeoutIdQueuedAutoRefresh =
|
||||
setTimeout(
|
||||
() => {
|
||||
if (this.autoRefreshReasonBlockUpdate !== null) {
|
||||
const isUpdateStillRelevant =
|
||||
this.isReceivableBlockUpdateRelevant(this.autoRefreshReasonBlockUpdate);
|
||||
|
||||
if (isUpdateStillRelevant === false) {
|
||||
this.enableRefreshesEventually();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.loadAccountDetails();
|
||||
},
|
||||
delayMS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue