Skip to content
Snippets Groups Projects
Commit 1c0af61f authored by Jack Reed's avatar Jack Reed
Browse files

Ensure that a tree exists before we try to access its nodes

parent af17f15c
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ const getVisibleLeafAndBranchNodeIds = createSelector(
getVisibleCanvasIds,
],
(tree, canvasIds) => {
if (canvasIds.length === 0) return [];
if (canvasIds.length === 0 || !tree) return [];
return getVisibleNodeIdsInSubTree(tree.nodes, canvasIds);
},
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment