Skip to content

Commit a2ea0bf

Browse files
authored
bug: fix region veto to use match options (#293)
1 parent 729a0de commit a2ea0bf

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

components/match/MatchRegionVeto.vue

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,32 @@ export default {
301301
);
302302
},
303303
regions() {
304-
return useApplicationSettingsStore().availableRegions.filter((region) => {
305-
return region.is_lan === false;
304+
const configuredRegions: string[] = this.match.options?.regions || [];
305+
const available = useApplicationSettingsStore().availableRegions;
306+
307+
return configuredRegions.map((value) => {
308+
const existing = available.find(
309+
(region) => region.value.toLowerCase() === value.toLowerCase(),
310+
);
311+
if (existing) {
312+
return existing;
313+
}
314+
315+
return {
316+
value,
317+
description: value,
318+
status: "Offline",
319+
is_lan: false,
320+
};
306321
});
307322
},
308323
availableRegions() {
309324
return this.regions
310325
.filter(({ value }) => {
326+
const normalizedValue = value.toLowerCase();
311327
if (
312328
this.picks.find(({ region }) => {
313-
return region === value;
329+
return region.toLowerCase() === normalizedValue;
314330
})
315331
) {
316332
return false;

0 commit comments

Comments
 (0)