Skip to content

Commit

Permalink
Handle missing labels in entry gracefully
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Sep 25, 2020
1 parent e9e8af9 commit b843a34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TreeNode } from './tree-node';
const entryToTreeNode = (entry: Entry) => ({
id: entry.id,
parentId: entry.parentId,
name: entry.labels[0],
name: ((entry.labels) && (entry.labels.length > 0)) ? entry.labels[0] : '',
isRoot: false,
children: []
} as TreeNode);
Expand Down

0 comments on commit b843a34

Please sign in to comment.