Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
* `View.isView`
* `Filter.isFilter`

### 🐞 Bug Fixes

* Fixed error encountered when attempting to `store.revert()` on a store with summary records.

### 🎁 New Features

* Enhanced `Field.rules` to support `warning` and `info` severity. Useful for non-blocking
Expand Down
6 changes: 4 additions & 2 deletions data/Store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1221,12 +1221,14 @@ export class Store
const recToRevert = records.find(it => it.id === summaryRec.id);
if (!recToRevert) return summaryRec;

// StoreRecordConfig requires data to be a "new object dedicated to this StoreRecord".
const data = {...recToRevert.committedData};
const ret = new StoreRecord({
id: recToRevert.id,
store: this,
raw: recToRevert.raw,
data: recToRevert.committedData,
committedData: recToRevert.committedData,
data,
committedData: data,
parent: null,
isSummary: true
});
Expand Down
Loading