Skip to content

Commit

Permalink
fix: prevent 'cannot read property "filter" of undefined' during node…
Browse files Browse the repository at this point in the history
…s filtering (#6453)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
Alexander Matyushentsev authored and alexmt committed Jul 22, 2021
1 parent eaa0c1e commit fae6150
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function compareNodes(first: ResourceTreeNode, second: ResourceTreeNode)
return Math.sign(numberA - numberB);
}
function getRevision(a: ResourceTreeNode) {
const filtered = a.info.filter(b => b.name === 'Revision' && b)[0];
const filtered = (a.info || []).filter(b => b.name === 'Revision' && b)[0];
if (filtered == null) {
return '';
}
Expand Down

0 comments on commit fae6150

Please sign in to comment.