From 71c136152a91af23e2491d445d02c3f58305324e Mon Sep 17 00:00:00 2001 From: Bipul Adhikari Date: Tue, 17 Sep 2024 10:12:33 +0545 Subject: [PATCH] Add optional chaining for owner references Signed-off-by: Bipul Adhikari --- packages/shared/src/topology/utils/resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/topology/utils/resource.ts b/packages/shared/src/topology/utils/resource.ts index 1b5f77138..ef603e82f 100644 --- a/packages/shared/src/topology/utils/resource.ts +++ b/packages/shared/src/topology/utils/resource.ts @@ -11,7 +11,7 @@ export const resolveResourceUntilDeployment = ( if (!owner) { return null; } - if (owner.kind === DeploymentModel.kind) { + if (owner?.kind === DeploymentModel.kind) { return owner as DeploymentKind; } else { return resolveResourceUntilDeployment(