remove redundant invariant

This commit is contained in:
dwelle 2025-03-23 17:47:15 +01:00
parent bdbddb3c88
commit cc4f5665aa

View file

@ -12,7 +12,6 @@ import {
castArray,
findLastIndex,
getUpdatedTimestamp,
invariant,
isTestEnv,
} from "../utils";
@ -241,8 +240,6 @@ export const duplicateElements = (
index: number,
elements: ExcalidrawElement | null | ExcalidrawElement[],
) => {
invariant(index >= 0, "targetIndex must be >= 0");
if (!elements) {
return;
}