refactor(core): remove unnecessary warning

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-05 22:48:28 +01:00
parent 1697e96508
commit c72e75db38

View File

@@ -118,12 +118,10 @@ export const applyChanges = <
const index = elements.findIndex((el) => el.id === change.item.id)
if (index === -1) elements.push(<T>change.item)
else warn(`${isNode(change.item) ? `Node` : `Edge`} with id ${change.item.id} already exists`)
} else if (change.type === 'remove') {
const index = elements.findIndex((el) => el.id === change.id)
if (index !== -1) elements.splice(index, 1)
else warn(`Element with id ${change.id} does not exist`)
}
})