Skip to content

Commit

Permalink
ARTESCA-11299: In case of no location created, display all the storag…
Browse files Browse the repository at this point in the history
…e options
  • Loading branch information
ChengYanJin committed Jul 2, 2024
1 parent bf03275 commit e95ffa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/react/locations/LocationEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function LocationEditor() {
convertToForm({ ...newLocationDetails(), ...locationEditing }),
);
const selectOptions = useMemo(() => {
if (!locations) return [];
return selectStorageOptions(
capabilities,
locations,
Expand Down
4 changes: 2 additions & 2 deletions src/react/utils/storageOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ export const getLocationTypeShort = (

export function selectStorageOptions(
capabilities: Capabilities,
locations: LocationInfo[],
locations?: LocationInfo[],
labelFn?: LabelFunction,
exceptHidden = true,
): Array<StorageOptionSelect> {
const hdLocation = locations.find(
const hdLocation = locations?.find(
(l) => l.type === LocationV1.LocationTypeEnum.ScalityHdclientV2,
);
return Object.keys(storageOptions)
Expand Down

0 comments on commit e95ffa1

Please sign in to comment.