From: Colin Snover Date: Sun, 9 Jan 2011 21:58:23 +0000 (-0600) Subject: Fix jQuery.queue leaks empty queues. X-Git-Tag: 1.5rc1~51^2~1^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=80af46e8ffe8292e0af0537db6c7e89019e5edba;p=jquery.git Fix jQuery.queue leaks empty queues. --- diff --git a/src/queue.js b/src/queue.js index 5fb04df80..9e3e2fb52 100644 --- a/src/queue.js +++ b/src/queue.js @@ -46,6 +46,10 @@ jQuery.extend({ jQuery.dequeue(elem, type); }); } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + } } });