Skip to content

Commit 4b01943

Browse files
authored
Merge pull request #239 from keithchong/fix-CRDsNotInstalledYet
fix: Account for App Resources whose CRDs haven't been installed yet
2 parents 04eec96 + e589bee commit 4b01943

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/gitops/components/application/graph/nodes/ResourceNode.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ export const ResourceNode: React.FC<CustomNodeProps & WithSelectionProps & WithC
4949
version: data.version,
5050
kind: data.kind,
5151
});
52-
const resourcePath =
53-
data.kind === ApplicationModel.kind
52+
// eslint-disable-next-line no-nested-ternary
53+
const resourcePath = k8sModel
54+
? data.kind === ApplicationModel.kind
5455
? resourcePathFromModel(ApplicationModel as K8sModel, data.name, data.namespace) +
5556
'/resources'
56-
: resourcePathFromModel(k8sModel as K8sModel, data.name, data.namespace);
57+
: resourcePathFromModel(k8sModel as K8sModel, data.name, data.namespace)
58+
: '';
5759
const transform = resourceNodeLayout ? `scale(0.6) translate(8, 6)` : '';
5860
return (
5961
<DefaultNode

0 commit comments

Comments
 (0)