]> source.dussan.org Git - jquery.git/commitdiff
Uses a copy of the flags when they are given as an object rather than the object...
authorjaubourg <j@ubourg.net>
Wed, 25 Apr 2012 00:06:21 +0000 (02:06 +0200)
committerjaubourg <j@ubourg.net>
Wed, 25 Apr 2012 00:06:21 +0000 (02:06 +0200)
src/callbacks.js

index 20422c35a0918f6647ea6a1bb42ad35379d87a90..9e034cba0a0fcb1bdeeb6087e357ac3743ec057f 100644 (file)
@@ -40,7 +40,7 @@ jQuery.Callbacks = function( flags ) {
 
        // Convert flags from String-formatted to Object-formatted if needed
        // (we check in cache first)
-       flags = typeof flags === "string" ? ( flagsCache[ flags ] || createFlags( flags ) ) : ( flags || {} );
+       flags = typeof flags === "string" ? ( flagsCache[ flags ] || createFlags( flags ) ) : jQuery.extend( {}, flags );
 
        var // Actual callback list
                list = [],