diff --git a/packages/orchestrator-ui-components/src/components/WfoForms/formFields/SubscriptionField.tsx b/packages/orchestrator-ui-components/src/components/WfoForms/formFields/SubscriptionField.tsx index f8d247195..4a8a04171 100644 --- a/packages/orchestrator-ui-components/src/components/WfoForms/formFields/SubscriptionField.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoForms/formFields/SubscriptionField.tsx @@ -193,7 +193,7 @@ function SubscriptionFieldDefinition({ (fixedInput) => fixedInput.field === 'port_speed', ); if ( - portSpeedInput && + portSpeedInput?.value && parseInt(portSpeedInput.value.toString(), 10) < parseInt(usedBandwidth.toString(), 10) ) { diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/utils/utils.ts b/packages/orchestrator-ui-components/src/components/WfoSubscription/utils/utils.ts index f5cb49274..836a7f2ed 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/utils/utils.ts +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/utils/utils.ts @@ -27,7 +27,7 @@ export const getFieldFromProductBlockInstanceValues = ( const nameValue = instanceValues.find( (instanceValue) => instanceValue.field === field, ); - return nameValue ? nameValue.value : ''; + return nameValue?.value ?? ''; }; export const getProductBlockTitle = ( diff --git a/packages/orchestrator-ui-components/src/types/types.ts b/packages/orchestrator-ui-components/src/types/types.ts index 0a4f30d2b..c66631949 100644 --- a/packages/orchestrator-ui-components/src/types/types.ts +++ b/packages/orchestrator-ui-components/src/types/types.ts @@ -8,7 +8,7 @@ type GenericResponse = { [key: string]: unknown }; export type FieldValue = { field: string; - value: string | number | boolean; + value: string | number | boolean | null; }; export enum EngineStatus {