Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df9e60c commit 9bedeb3Copy full SHA for 9bedeb3
src/Angular.js
@@ -336,15 +336,19 @@ function setHashKey(obj, h) {
336
*/
337
function extend(dst) {
338
var h = dst.$$hashKey;
339
- forEach(arguments, function(obj) {
340
- if (obj !== dst) {
341
- forEach(obj, function(value, key) {
342
- dst[key] = value;
343
- });
+
+ for (var i = 1, ii = arguments.length; i < ii; i++) {
+ var obj = arguments[i];
+ if (obj) {
+ var keys = Object.keys(obj);
344
+ for (var j = 0, jj = keys.length; j < jj; j++) {
345
+ var key = keys[j];
346
+ dst[key] = obj[key];
347
+ }
348
}
349
350
- setHashKey(dst,h);
351
+ setHashKey(dst, h);
352
return dst;
353
354
0 commit comments