Merge branch 'master' into 16812-token-appears-in-the-download-URL
[arvados-workbench2.git] / src / models / tree.ts
index c7713cbcf08fc996429ff0905e601f14fd6a4ec8..e92913887a0dfc7b28e21ae20b047dc68d61f148 100644 (file)
@@ -74,6 +74,7 @@ export const setNodeValueWith = <T>(mapFn: (value: T) => T) => (id: string) => (
 export const mapTreeValues = <T, R>(mapFn: (value: T) => R) => (tree: Tree<T>): Tree<R> =>
     getNodeDescendantsIds('')(tree)
         .map(id => getNode(id)(tree))
+        .filter(node => !!node)
         .map(mapNodeValue(mapFn))
         .reduce((newTree, node) => setNode(node)(newTree), createTree<R>());