You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should rather return an empty array, as an empty pathLocator does not represent any node of the tree. Also, other function in DefaultTree expect getPathNodes to return an array.
The text was updated successfully, but these errors were encountered:
I think you are right if we only consider cosmoz-tree. However an empty path locator represents the root path in the cosmoz-treenode-navigator.
=> What def should be changed is returning roots instead of treeData so the function always returns an array.
I guess we have those possibilities on an empty path:
a) we return an empty array & implement the respective changes in the navigator
b) we return the roots array
c) we return nodeObj as array
Description
Currently, the implementation of
getPathNodes
inDefaultTree
returns the whole tree when thepathLocator
argument is null, undefined or empty.cosmoz-tree/cosmoz-default-tree.html
Lines 168 to 170 in 5768674
I think it should rather return an empty array, as an empty pathLocator does not represent any node of the tree. Also, other function in
DefaultTree
expectgetPathNodes
to return an array.The text was updated successfully, but these errors were encountered: