Skip to content

Commit

Permalink
912 Adds to the type of the FieldValue type
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardovdheijden committed Apr 5, 2024
1 parent df1a9b6 commit 0959330
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function SubscriptionFieldDefinition({
(fixedInput) => fixedInput.field === 'port_speed',
);
if (
portSpeedInput &&
portSpeedInput?.value &&
parseInt(portSpeedInput.value.toString(), 10) <
parseInt(usedBandwidth.toString(), 10)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
2 changes: 1 addition & 1 deletion packages/orchestrator-ui-components/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0959330

Please sign in to comment.