From 5a1ce56e8ce83f01e01ef531d90c52181c3e3a1a Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 1 Apr 2025 21:17:16 +0200 Subject: [PATCH] fix: compare `nodeStrokeWidth` with `number`, not with `string` --- .changeset/rotten-news-deliver.md | 5 +++++ packages/react/src/additional-components/MiniMap/MiniMap.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/rotten-news-deliver.md diff --git a/.changeset/rotten-news-deliver.md b/.changeset/rotten-news-deliver.md new file mode 100644 index 00000000..a44721e1 --- /dev/null +++ b/.changeset/rotten-news-deliver.md @@ -0,0 +1,5 @@ +--- +'@xyflow/react': patch +--- + +fix: compare `nodeStrokeWidth` with `number`, not with `string` diff --git a/packages/react/src/additional-components/MiniMap/MiniMap.tsx b/packages/react/src/additional-components/MiniMap/MiniMap.tsx index ad899043..dfb018b8 100644 --- a/packages/react/src/additional-components/MiniMap/MiniMap.tsx +++ b/packages/react/src/additional-components/MiniMap/MiniMap.tsx @@ -143,7 +143,7 @@ function MiniMapComponent({ typeof maskStrokeWidth === 'number' ? maskStrokeWidth * viewScale : undefined, '--xy-minimap-node-background-color-props': typeof nodeColor === 'string' ? nodeColor : undefined, '--xy-minimap-node-stroke-color-props': typeof nodeStrokeColor === 'string' ? nodeStrokeColor : undefined, - '--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'string' ? nodeStrokeWidth : undefined, + '--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'number' ? nodeStrokeWidth : undefined, } as CSSProperties } className={cc(['react-flow__minimap', className])}