Skip to content

Commit 573cdbb

Browse files
JohannesEbkeRycochet
authored andcommitted
Fix crash on queue stop (#830)
1 parent ad6548b commit 573cdbb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

velocity.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3004,7 +3004,12 @@
30043004
/* Note: Velocity rolls its own delay function since jQuery doesn't have a utility alias for $.fn.delay()
30053005
(and thus requires jQuery element creation, which we avoid since its overhead includes DOM querying). */
30063006
if (parseFloat(opts.delay) && opts.queue !== false) {
3007-
$.queue(element, opts.queue, function(next) {
3007+
$.queue(element, opts.queue, function(next, clearQueue) {
3008+
if (clearQueue === true) {
3009+
/* Do not continue with animation queueing. */
3010+
return true;
3011+
}
3012+
30083013
/* This is a flag used to indicate to the upcoming completeCall() function that this queue entry was initiated by Velocity. See completeCall() for further details. */
30093014
Velocity.velocityQueueEntryFlag = true;
30103015

0 commit comments

Comments
 (0)