Permalink
Browse files

#143 extend optimization

  • Loading branch information...
1 parent a038a3b commit a043fb1e9dbbdc7153b34e8160ee6fbd83ed68e0 @ericz ericz committed Oct 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/nowUtil.js
View
2 lib/nowUtil.js
@@ -101,7 +101,7 @@ var util = {
extend: function (target, obj) {
for (var i = 0, keys = Object.keys(obj), ii = keys.length; i < ii; i++) {
var key = keys[i];
- if (obj[key] && typeof obj[key] === 'object') {
+ if (util.hasProperty(target, key) && obj[key] && typeof obj[key] === 'object') {
if(Array.isArray(obj[key])) {
target[key] = target[key] || [];
} else {

0 comments on commit a043fb1

Please sign in to comment.