From 84d33d4b073efc09cd91df7d6ef219b4de23e858 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Thu, 14 Oct 2021 10:51:20 +0200 Subject: [PATCH] Bugfix --- src/editor/Editor.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index e108d73..6605399 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -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