mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
make sure index if >= 0
This commit is contained in:
parent
2ed9d0ebdc
commit
15ece8a8cd
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ export const duplicateElements = (
|
|||
index: number,
|
||||
elements: ExcalidrawElement | null | ExcalidrawElement[],
|
||||
) => {
|
||||
invariant(index !== -1, "targetIndex === -1 ");
|
||||
invariant(index >= 0, "targetIndex must be >= 0");
|
||||
|
||||
if (!elements) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue