Revert portions of 7acb141ed7f2dedd950bb65acf878098640d081e that attempt to use a...
[jquery.git] / src / data.js
index 21f0e3a..9fee459 100644 (file)
@@ -68,7 +68,7 @@ jQuery.extend({
 
                // An object can be passed to jQuery.data instead of a key/value pair; this gets
                // shallow copied over onto the existing cache
-               if ( typeof name === "object" ) {
+               if ( typeof name === "object" || typeof name === "function" ) {
                        if ( pvt ) {
                                cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
                        } else {