refactor(core): remove unnecessary warning
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -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`)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user