mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-14 21:10:37 +02:00
refactor: remove dependency on the (static) Scene (#9389)
This commit is contained in:
@@ -680,7 +680,7 @@ export const arrayToMap = <T extends { id: string } | string>(
|
||||
return items.reduce((acc: Map<string, T>, element) => {
|
||||
acc.set(typeof element === "string" ? element : element.id, element);
|
||||
return acc;
|
||||
}, new Map());
|
||||
}, new Map() as Map<string, T>);
|
||||
};
|
||||
|
||||
export const arrayToMapWithIndex = <T extends { id: string }>(
|
||||
|
Reference in New Issue
Block a user