@ngxs/store 3.7.6-dev.master-2d80aec → 3.7.6-dev.master-5f9405c

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.
@@ -1538,19 +1538,20 @@
1538
1538
  type: i0.Injectable
1539
1539
  }], ctorParameters: function () { return [{ type: InternalActions }, { type: InternalDispatchedActionResults }, { type: PluginManager }, { type: StateStream }, { type: InternalNgxsExecutionStrategy }, { type: InternalErrorReporter }]; } });
1540
1540
 
1541
- function simplePatch(val) {
1541
+ function simplePatch(value) {
1542
1542
  return function (existingState) {
1543
- if (Array.isArray(val)) {
1544
- throwPatchingArrayError();
1545
- }
1546
- else if (typeof val !== 'object') {
1547
- throwPatchingPrimitiveError();
1543
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1544
+ if (Array.isArray(value)) {
1545
+ throwPatchingArrayError();
1546
+ }
1547
+ else if (typeof value !== 'object') {
1548
+ throwPatchingPrimitiveError();
1549
+ }
1548
1550
  }
1549
1551
  var newState = Object.assign({}, existingState);
1550
- for (var key in val) {
1552
+ for (var key in value) {
1551
1553
  // deep clone for patch compatibility
1552
- // noinspection JSUnfilteredForInLoop (IDE)
1553
- newState[key] = val[key];
1554
+ newState[key] = value[key];
1554
1555
  }
1555
1556
  return newState;
1556
1557
  };