Skip to content

Commit c24e4cf

Browse files
committed
Update createManagedControlPlane.ts
1 parent 5a2cdc8 commit c24e4cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/api/types/crate/createManagedControlPlane.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface CreateManagedControlPlaneType {
5757
}
5858

5959
// rename is used to make creation of MCP working properly
60-
const replaceComponentsName = {
60+
const replaceComponentsName: Record<string, string> = {
6161
'sap-btp-service-operator': 'btpServiceOperator',
6262
'external-secrets': 'externalSecretsOperator',
6363
};
@@ -84,7 +84,9 @@ export const CreateManagedControlPlane = (
8484
)
8585
.map((component) => ({
8686
...component,
87-
name: replaceComponentsName[component.name] ?? component.name,
87+
name: Object.prototype.hasOwnProperty.call(replaceComponentsName, component.name)
88+
? replaceComponentsName[component.name]
89+
: component.name,
8890
}))
8991
.reduce((acc, item) => {
9092
acc[item.name] = { version: item.selectedVersion };

0 commit comments

Comments
 (0)