Skip to content

Commit

Permalink
Fix: dont allow reconcileFields to recurse if null/undefined (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
alewitt2 authored Apr 1, 2020
1 parent e804178 commit 5ed5675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/BaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ module.exports = class BaseController {
path.push(key);
if (!objectPath.has(config, path)) {
objectPath.set(config, path, null);
} else if (typeof lastApplied[key] == 'object' && !Array.isArray(lastApplied[key])) {
} else if (lastApplied[key] && typeof lastApplied[key] == 'object' && !Array.isArray(lastApplied[key])) {
this.reconcileFields(config, lastApplied[key], path);
}
});
Expand Down

0 comments on commit 5ed5675

Please sign in to comment.