File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ export async function getDefaultRegionOption({
3737
3838 if ( locLatLon === undefined ) return undefined
3939
40- const allRegions = cloudProvider === 'AWS' ? AWS_REGIONS_COORDINATES : FLY_REGIONS_COORDINATES
40+ const isAWSProvider = [ 'AWS' , 'AWS_K8S' ] . includes ( cloudProvider )
41+
42+ const allRegions = isAWSProvider ? AWS_REGIONS_COORDINATES : FLY_REGIONS_COORDINATES
4143 const locations =
4244 useRestrictedPool && restrictedPool
4345 ? Object . entries ( allRegions )
@@ -55,7 +57,7 @@ export async function getDefaultRegionOption({
5557 const shortestDistance = Math . min ( ...distances )
5658 const closestRegion = Object . keys ( locations ) [ distances . indexOf ( shortestDistance ) ]
5759
58- return cloudProvider === 'AWS'
60+ return isAWSProvider
5961 ? AWS_REGIONS [ closestRegion as keyof typeof AWS_REGIONS ] . displayName
6062 : FLY_REGIONS [ closestRegion as keyof typeof FLY_REGIONS ] . displayName
6163 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments