Skip to content

Commit

Permalink
Fix crash on queue stop (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesEbke authored and Rycochet committed Jan 6, 2018
1 parent ad6548b commit 573cdbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion velocity.js
Original file line number Diff line number Diff line change
Expand Up @@ -3004,7 +3004,12 @@
/* Note: Velocity rolls its own delay function since jQuery doesn't have a utility alias for $.fn.delay()
(and thus requires jQuery element creation, which we avoid since its overhead includes DOM querying). */
if (parseFloat(opts.delay) && opts.queue !== false) {
$.queue(element, opts.queue, function(next) {
$.queue(element, opts.queue, function(next, clearQueue) {
if (clearQueue === true) {
/* Do not continue with animation queueing. */
return true;
}

/* 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. */
Velocity.velocityQueueEntryFlag = true;

Expand Down

0 comments on commit 573cdbb

Please sign in to comment.