Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix error in _diffDeep

Prevent method from being called with an undefined value for object1.
  • Loading branch information...
commit 2acce75c8db173e3270ad33f88b709cae1cf10ac 1 parent e2bec9f
@hugo-agbonon hugo-agbonon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/config.js
View
2  lib/config.js
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.