Bugfix
This commit is contained in:
parent
1e75b9b119
commit
84d33d4b07
|
@ -223,13 +223,13 @@ export default class Editor extends Component {
|
||||||
const updatedBodies = [
|
const updatedBodies = [
|
||||||
// Current bodies
|
// Current bodies
|
||||||
...this.state.currentAnnotation.bodies
|
...this.state.currentAnnotation.bodies
|
||||||
// Remvoe
|
// Remove
|
||||||
.filter(b => !toRemove.includes(b))
|
.filter(b => !toRemove.includes(b))
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
.map(b => {
|
.map(b => {
|
||||||
const { updated } = toUpdate.find(t => t.previous === b);
|
const diff = toUpdate.find(t => t.previous === b);
|
||||||
return updated ? updated : body;
|
return diff ? diff.updated : body;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Append
|
// Append
|
||||||
|
|
Loading…
Reference in New Issue