mobx 6.3.7 → 6.3.8

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.
@@ -3679,9 +3679,12 @@ var ObservableArrayAdministration = /*#__PURE__*/function () {
3679
3679
 
3680
3680
  return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));
3681
3681
  } else {
3682
- var res = this.values_.slice(index, index + deleteCount);
3683
- var oldItems = this.values_.slice(index + deleteCount);
3684
- this.values_.length = index + newItems.length - deleteCount;
3682
+ // The items removed by the splice
3683
+ var res = this.values_.slice(index, index + deleteCount); // The items that that should remain at the end of the array
3684
+
3685
+ var oldItems = this.values_.slice(index + deleteCount); // New length is the previous length + addition count - deletion count
3686
+
3687
+ this.values_.length += newItems.length - deleteCount;
3685
3688
 
3686
3689
  for (var i = 0; i < newItems.length; i++) {
3687
3690
  this.values_[index + i] = newItems[i];