Skip to content

Commit

Permalink
Do not conditionally call Reconciliation graph hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpellizzari committed Feb 13, 2023
1 parent 8d66e3d commit 64ee6ac
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions ui/components/ReconciliationGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ function ReconciliationGraph({ className, parentObject, source }: Props) {
data: objects,
error,
isLoading,
} = parentObject
? useGetReconciledTree(
parentObject.name,
parentObject.namespace,
Kind[parentObject.type],
parentObject.inventory,
parentObject.clusterName
)
: { data: [], error: null, isLoading: false };
} = useGetReconciledTree(
parentObject.name,
parentObject.namespace,
Kind[parentObject.type],
parentObject.inventory,
parentObject.clusterName
);

//add extra nodes
const secondNode = {
name: parentObject.name,
Expand All @@ -64,7 +63,7 @@ function ReconciliationGraph({ className, parentObject, source }: Props) {

const rootNode = {
...source,
type: source.kind,
type: source?.kind,
clusterName: parentObject.clusterName,
children: [secondNode],
};
Expand Down

0 comments on commit 64ee6ac

Please sign in to comment.