remove unsafe optimization

This commit is contained in:
dwelle 2025-04-06 23:15:18 +02:00
parent 2cd8df0fb9
commit c6fcd3fac4

View file

@ -87,11 +87,7 @@ const StaticCanvas = (props: StaticCanvasProps) => {
return <div className="excalidraw__canvas-wrapper" ref={wrapperRef} />; return <div className="excalidraw__canvas-wrapper" ref={wrapperRef} />;
}; };
const getRelevantAppStateProps = ( const getRelevantAppStateProps = (appState: AppState): StaticCanvasAppState => {
appState: AppState,
):
| StaticCanvasAppState
| Omit<StaticCanvasAppState, "selectedElementIds" | "activeTool"> => {
const relevantAppStateProps = { const relevantAppStateProps = {
zoom: appState.zoom, zoom: appState.zoom,
scrollX: appState.scrollX, scrollX: appState.scrollX,
@ -119,11 +115,6 @@ const getRelevantAppStateProps = (
croppingElementId: appState.croppingElementId, croppingElementId: appState.croppingElementId,
}; };
if (appState.activeTool.type === "lasso") {
delete (relevantAppStateProps as Partial<typeof relevantAppStateProps>)
.selectedElementIds;
}
return relevantAppStateProps; return relevantAppStateProps;
}; };