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])}