chore(shallowNodeData): cleanup

This commit is contained in:
moklick
2024-03-14 13:02:34 +01:00
parent 7104872a12
commit 0e086956e2
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -1,5 +1,11 @@
# @xyflow/react
## 12.0.0-next.12
## Patch changes
- fix useNodesData: handle invalid node id thanks @saswatax
## 12.0.0-next.11
## Patch changes
@@ -2,7 +2,7 @@ import { NodeBase } from '../types';
type NodeData = Pick<NodeBase, 'id' | 'type' | 'data'>;
export function shallowNodeData(a: NodeData | null | NodeData[], b: NodeData | null | NodeData[]) {
export function shallowNodeData(a: NodeData | NodeData[] | null, b: NodeData | NodeData[] | null) {
if (a === null || b === null) {
return false;
}