@webkrafters/react-observable-context 2.1.5 → 2.1.6

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/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -129,7 +129,9 @@ var _setState = function () {
129
129
  if ((0, _lodash5["default"])(state[stateKey]) && isPlainObjectNewState) {
130
130
  return setPlainObject(state, newState, changed, replaced, stateKey);
131
131
  }
132
- replaced[stateKey] = state[stateKey];
132
+ if (stateKey in state) {
133
+ replaced[stateKey] = state[stateKey];
134
+ }
133
135
  state[stateKey] = isArrayNewState || isPlainObjectNewState ? (0, _lodash["default"])(newState[stateKey]) : newState[stateKey];
134
136
  changed[stateKey] = newState[stateKey];
135
137
  };
package/package.json CHANGED
@@ -79,5 +79,5 @@
79
79
  "test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
80
80
  },
81
81
  "types": "dist/index.d.ts",
82
- "version": "2.1.5"
82
+ "version": "2.1.6"
83
83
  }