This commit is contained in:
Rainer Simon 2021-10-14 10:51:20 +02:00
parent 1e75b9b119
commit 84d33d4b07
1 changed files with 3 additions and 3 deletions

View File

@ -223,13 +223,13 @@ export default class Editor extends Component {
const updatedBodies = [
// Current bodies
...this.state.currentAnnotation.bodies
// Remvoe
// Remove
.filter(b => !toRemove.includes(b))
// Update
.map(b => {
const { updated } = toUpdate.find(t => t.previous === b);
return updated ? updated : body;
const diff = toUpdate.find(t => t.previous === b);
return diff ? diff.updated : body;
}),
// Append