Skip to content

Commit

Permalink
fix(ui): Crash on application pod view (#6384)
Browse files Browse the repository at this point in the history
Signed-off-by: Remington Breeze <[email protected]>
  • Loading branch information
rbreeze authored Jun 2, 2021
1 parent 3fbe818 commit f43a6ad
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ export class PodView extends React.Component<PodViewProps> {
}

const statusByKey = new Map<string, ResourceStatus>();
this.props.app.status.resources.forEach(res => statusByKey.set(nodeKey(res), res));
if (this.props.app) {
this.props.app.status.resources.forEach(res => statusByKey.set(nodeKey(res), res));
}
(tree.nodes || []).forEach((rnode: ResourceTreeNode) => {
if (sortMode !== 'node') {
parentsFor[rnode.uid] = rnode.parentRefs as PodGroup[];
Expand Down Expand Up @@ -335,7 +337,7 @@ export class PodView extends React.Component<PodViewProps> {
fullName: nodeKey(rnode),
metadata: {name: rnode.name},
spec: {nodeName: 'Unknown'},
health: rnode.health.status
health: rnode.health ? rnode.health.status : 'Unknown'
} as Pod;

// Get node name for Pod
Expand Down

0 comments on commit f43a6ad

Please sign in to comment.