hinted-tree-merger 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/merger.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hinted-tree-merger",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/merger.mjs CHANGED
@@ -122,7 +122,7 @@ export function mergeArrays(a, b, path, actions = nullAction, hints) {
122
122
  */
123
123
  export function merge(a, b, path, actions = nullAction, hints) {
124
124
  if (isScalar(a)) {
125
- if (b !== undefined && !isEqual(a, b)) {
125
+ if (b !== undefined && b !== null && !isEqual(a, b)) {
126
126
  const hint = hintFor(hints, path);
127
127
  b = hint.keepHints ? deepCopy(b) : removeHintedValues(b);
128
128
  actions({ add: b, path }, hint);