Skip to content

Commit

Permalink
Fix error in _diffDeep
Browse files Browse the repository at this point in the history
Prevent method from being called with an undefined value for object1.
  • Loading branch information
codeheroics committed Feb 6, 2013
1 parent e2bec9f commit 2acce75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2acce75

Please sign in to comment.