Permalink
Browse files

Merge pull request #43 from hugo-agbonon/v0.4.18

Prevent call of Config.prototype._diffDeep with an undefined argument
  • Loading branch information...
lorenwest committed Feb 6, 2013
2 parents e2bec9f + 2acce75 commit 0eff980b5a18a7b5a26d1828cc304526315a4d13
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/config.js
View
@@ -917,7 +917,7 @@ Config.prototype._diffDeep = function(object1, object2, depth) {
for (var parm in object2) {
var value1 = object1[parm];
var value2 = object2[parm];
- if (value2 && typeof(value2) == 'object') {
+ if (value1 && value2 && typeof(value2) == 'object') {
if (!(t._equalsDeep(value1, value2))) {
diff[parm] = t._diffDeep(value1, value2, depth - 1);
}

0 comments on commit 0eff980

Please sign in to comment.