chore(shallowNodeData): cleanup
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# @xyflow/react
|
# @xyflow/react
|
||||||
|
|
||||||
|
## 12.0.0-next.12
|
||||||
|
|
||||||
|
## Patch changes
|
||||||
|
|
||||||
|
- fix useNodesData: handle invalid node id thanks @saswatax
|
||||||
|
|
||||||
## 12.0.0-next.11
|
## 12.0.0-next.11
|
||||||
|
|
||||||
## Patch changes
|
## Patch changes
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { NodeBase } from '../types';
|
|||||||
|
|
||||||
type NodeData = Pick<NodeBase, 'id' | 'type' | 'data'>;
|
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) {
|
if (a === null || b === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user