Fix bug for with not finding parent node on repretitive trees

This commit is contained in:
behnam 2024-07-23 17:08:17 +03:00
parent 68f99a0d64
commit d2cab2a1c4

View File

@ -33,9 +33,9 @@ export const useTreeViewNodes = ({
if (node.disabled) { if (node.disabled) {
return true; return true;
} }
while (node.parentId != null) { while (node && node.parentId != null) {
node = instance.getNode(node.parentId); node = instance.getNode(node.parentId);
if (node.disabled) { if (node?.disabled) {
return true; return true;
} }
} }