aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2008-05-14 19:45:31 +0000
committerAriel Flesler <aflesler@gmail.com>2008-05-14 19:45:31 +0000
commit69f72761faa6878e361711b70f1d27c467d256e4 (patch)
treec8f4c0849af5a7f0145e75472e43751ef47c5bc1
parent831625c43e85a010064cac18b14ea49f1531c315 (diff)
downloadjquery-69f72761faa6878e361711b70f1d27c467d256e4.tar.gz
jquery-69f72761faa6878e361711b70f1d27c467d256e4.zip
jquery core: fixed deep extend of objects. Closes #1562 & #2820.
-rw-r--r--src/core.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 8743f05c4..98a0dc4bd 100644
--- a/src/core.js
+++ b/src/core.js
@@ -579,8 +579,11 @@ jQuery.extend = jQuery.fn.extend = function() {
continue;
// Recurse if we're merging object values
- if ( deep && copy && typeof copy == "object" && src && !copy.nodeType )
- target[ name ] = jQuery.extend( deep, src, copy );
+ if ( deep && copy && typeof copy == "object" && !copy.nodeType )
+ target[ name ] = jQuery.extend( deep,
+ // Never move original objects, clone them
+ src || ( copy.length != null ? [ ] : { } )
+ , copy );
// Don't bring in undefined values
else if ( copy !== undefined )
e-signing-crl'>automated/noid/stable28-update-code-signing-crl Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/console.php
blob: 4fcb3d6c7a34cf4be648bcecb99c0767fdabdfe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109