Skip to content

Commit 63c30b4

Browse files
committed
fix zero
1 parent ba60c17 commit 63c30b4

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/webpage/settings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,6 @@ class InstancePicker implements OptionsElement<InstanceInfo | null> {
10031003
}
10041004

10051005
for (const instance of json) {
1006-
if (instance.display === false) {
1007-
continue;
1008-
}
10091006
const option = document.createElement("option");
10101007
option.disabled = !instance.online;
10111008
option.value = instance.name;
@@ -1024,6 +1021,9 @@ class InstancePicker implements OptionsElement<InstanceInfo | null> {
10241021
} else {
10251022
option.label = instance.name;
10261023
}
1024+
if (instance.display === false) {
1025+
continue;
1026+
}
10271027
datalist.append(option);
10281028
}
10291029
}

src/webpage/utils/utils.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,12 @@ class Directory {
371371

372372
export {Directory};
373373

374-
const mobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || (window.matchMedia && window.matchMedia("(pointer: coarse)").matches);
375-
const iOS = /iPhone|iPad|iPod/i.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
374+
const mobile =
375+
/iPhone|iPad|iPod|Android/i.test(navigator.userAgent) ||
376+
(window.matchMedia && window.matchMedia("(pointer: coarse)").matches);
377+
const iOS =
378+
/iPhone|iPad|iPod/i.test(navigator.userAgent) ||
379+
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
376380
export {mobile, iOS};
377381

378382
const datalist = document.getElementById("instances");
@@ -451,7 +455,7 @@ export async function getapiurls(str: string): Promise<InstanceUrls | null> {
451455
//region Instance list
452456
export async function getInstanceInfo(str: string): Promise<InstanceInfo | null> {
453457
// wait for it to be loaded...? Where is this even comming from?
454-
if (stringURLMap.size == 0) {
458+
if (stringURLMap.size === 0) {
455459
await new Promise<void>((res, _) => {
456460
let intervalId = setInterval(() => {
457461
if (stringURLMap.size !== 0) {

0 commit comments

Comments
 (0)