fix: missing collection name in path in explorer search results (#4793)
This commit is contained in:
@@ -73,7 +73,7 @@ const Title = styled(Text)`
|
||||
`;
|
||||
|
||||
const Path = styled(Text)<{ $selected: boolean }>`
|
||||
padding-top: 3px;
|
||||
padding-top: 2px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -15,11 +15,11 @@ export const flattenTree = (root: NavigationNode) => {
|
||||
return flattened;
|
||||
};
|
||||
|
||||
export const ancestors = (node: NavigationNode) => {
|
||||
export const ancestors = (node: NavigationNode | null) => {
|
||||
const ancestors: NavigationNode[] = [];
|
||||
while (node.parent !== null) {
|
||||
while (node !== null) {
|
||||
ancestors.unshift(node);
|
||||
node = node.parent as NavigationNode;
|
||||
node = node.parent as NavigationNode | null;
|
||||
}
|
||||
return ancestors;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user