Skip to content

Commit

Permalink
fix: WebUI failure when loading pod view 't.parentRefs is undefined' (#…
Browse files Browse the repository at this point in the history
…6490) (#6535)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
Alexander Matyushentsev authored and alexmt committed Jul 22, 2021
1 parent fae6150 commit 4725473
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ export class PodView extends React.Component<PodViewProps> {
this.props.app.status.resources.forEach(res => statusByKey.set(nodeKey(res), res));
}
(tree.nodes || []).forEach((rnode: ResourceTreeNode) => {
// make sure each node has not null/undefined parentRefs field
rnode.parentRefs = rnode.parentRefs || [];

if (sortMode !== 'node') {
parentsFor[rnode.uid] = rnode.parentRefs as PodGroup[];
const fullName = nodeKey(rnode);
Expand Down

0 comments on commit 4725473

Please sign in to comment.