- target[ name ] = jQuery.extend( deep,
- // Never move original objects, clone them
- src || ( copy.length != null ? [ ] : { } ), copy );
+ var clone;
+
+ if( src ) clone = src;
+ else if( jQuery.isArray(copy) ) clone = [ ];
+ else if( jQuery.isObject(copy) ) clone = { };
+ else clone = copy;
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );