fix useNodesData returning undefined in svelte flow
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
type ResultNodeType = Node<{}, 'result'>;
|
||||
|
||||
export function isTextNode(node: any): node is TextNodeType | UppercaseNode {
|
||||
return node.type === 'text' || node.type === 'uppercase';
|
||||
return !node || !node.type ? false : node.type === 'text' || node.type === 'uppercase';
|
||||
}
|
||||
|
||||
export type MyNode = TextNodeType | UppercaseNodeType | ResultNodeType;
|
||||
|
||||
Reference in New Issue
Block a user