From 914fb04014f34a29cdd4bd16d662b0c4e6e78af4 Mon Sep 17 00:00:00 2001 From: Sandro Trianni Date: Mon, 30 Jul 2018 09:04:01 -0400 Subject: [PATCH] Bugfix: Stopping custom named queue breaks default main queue activeTweens see https://github.com/julianshapiro/velocity/issues/889 --- velocity.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/velocity.js b/velocity.js index 3823df13..d06adfba 100644 --- a/velocity.js +++ b/velocity.js @@ -2835,10 +2835,10 @@ if (propertiesMap === "stop") { /* Since "reverse" uses cached start values (the previous call's endValues), these values must be changed to reflect the final value that the elements were actually tweened to. */ - /* Note: If only queue:false animations are currently running on an element, it won't have a tweensContainer - object. Also, queue:false animations can't be reversed. */ + /* Note: If only queue:false/queue:"custom" animations are currently running on an element, it won't have a tweensContainer + object. Also, queue:false/queue:"custom" animations can't be reversed. */ var data = Data(element); - if (data && data.tweensContainer && queueName !== false) { + if (data && data.tweensContainer && (queueName === true || queueName === "")) { $.each(data.tweensContainer, function(m, activeTween) { activeTween.endValue = activeTween.currentValue; });