Call clearInterval for the currentTimer if one exists
Prevents a double-click from causing the logo to sweep forever after a load completes.
This commit is contained in:
parent
f2fab27a56
commit
d4ffe705eb
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ start = ->
|
||||||
clearHighlights()
|
clearHighlights()
|
||||||
pieceIndex = 0
|
pieceIndex = 0
|
||||||
pieces.reverse() unless pieces[0] == firstPiece
|
pieces.reverse() unless pieces[0] == firstPiece
|
||||||
|
clearInterval(currentTimer) if currentTimer
|
||||||
currentTimer = setInterval(work, delay)
|
currentTimer = setInterval(work, delay)
|
||||||
|
|
||||||
stop = ->
|
stop = ->
|
||||||
|
|
Loading…
Reference in a new issue