Skip to content

Commit f855408

Browse files
authored
Fix stale delayTimeout execution after Stop (#5827)
Signed-off-by: Ady0333 <adityashinde1525@gmail.com>
1 parent fed14c5 commit f855408

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/logo.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,14 @@ class Logo {
10471047
this.onStopTurtle();
10481048
this.activity.blocks.bringToTop();
10491049

1050+
this._alreadyRunning = false;
10501051
this.stepQueue = {};
10511052
for (const turtle of this.activity.turtles.turtleList) {
10521053
turtle.unhighlightQueue = [];
1054+
if (turtle.delayTimeout !== null) {
1055+
clearTimeout(turtle.delayTimeout);
1056+
turtle.delayTimeout = null;
1057+
}
10531058
}
10541059

10551060
this._restoreConnections();

0 commit comments

Comments
 (0)