Skip to content

Commit 544ec07

Browse files
committed
chore: fix region sorting to prioritise available instead of disabled
1 parent 1d8d122 commit 544ec07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/helpers/regions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export function filterRegions(regions: Models.ConsoleRegion[]): RegionOption[] {
1515
return regions
1616
.filter((region) => region.$id !== 'default')
1717
.sort((a, b) => {
18-
if (a.disabled && !b.disabled) return 1;
19-
if (!a.disabled && b.disabled) return -1;
18+
if (a.available && !b.available) return 1;
19+
if (!a.available && b.available) return -1;
2020
return a.name.localeCompare(b.name);
2121
})
2222
.map((region) => ({

0 commit comments

Comments
 (0)