Skip to content

Commit 54b64de

Browse files
committed
fix(init): guard learnTimer callback against post-teardown execution
Prevent a race where a queued learnTimer callback fires after tearDown() has completed, creating an orphaned tipTimer interval.
1 parent 0ab5877 commit 54b64de

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lib/init/ui/ink-ui.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,9 @@ export class InkUI implements WizardUI {
816816
private startLearnSequence(): void {
817817
const store = this.store;
818818
this.learnTimer = setInterval(() => {
819+
if (this.torndown) {
820+
return;
821+
}
819822
const { learnState } = store.getSnapshot();
820823
if (learnState.complete) {
821824
this.stopLearnSequence();

0 commit comments

Comments
 (0)