fix: Prevent overriding the ring with empty value
Apparently changing it to an enum field introduced a bug when an empty value from revision would overwrite actual value from the item itself.
This commit is contained in:
@@ -113,7 +113,7 @@ const addRevisionToItem = (item = {
|
||||
body: '',
|
||||
info: '',
|
||||
}, revision) => {
|
||||
let newItem = Object.assign(Object.assign(Object.assign({}, item), revision), { body: ignoreEmptyRevisionBody(revision, item) });
|
||||
let newItem = Object.assign(Object.assign(Object.assign({}, item), revision), { ring: revision.ring ? revision.ring : item.ring, body: ignoreEmptyRevisionBody(revision, item) });
|
||||
if (revisionCreatesNewHistoryEntry(revision)) {
|
||||
newItem = Object.assign(Object.assign({}, newItem), { revisions: [revision, ...newItem.revisions] });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user