fix: add safe check for arrow points length in tranformToExcalidrawElements (#7863)

* fix: add safe check for arrow points length in tranformToExcalidrawElements

* add spec

* throw error only for dev mode

* fix lint
This commit is contained in:
Aakansha Doshi 2024-04-09 09:56:21 +05:30 committed by GitHub
parent 8a162a4cb4
commit a33a400f01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 721 additions and 39 deletions

View file

@ -673,6 +673,8 @@ export const arrayToMapWithIndex = <T extends { id: string }>(
export const isTestEnv = () => import.meta.env.MODE === "test";
export const isDevEnv = () => import.meta.env.MODE === "development";
export const wrapEvent = <T extends Event>(name: EVENT, nativeEvent: T) => {
return new CustomEvent(name, {
detail: {