mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-08 00:44:59 -05:00
fix: add opposites CORRECTLY.
This commit is contained in:
parent
b62f79e010
commit
7d0bb44568
@ -89,7 +89,7 @@ export const serverModDB: ModDBCategory[] = [
|
|||||||
name: "Always Online",
|
name: "Always Online",
|
||||||
description: "All servers that are always online.",
|
description: "All servers that are always online.",
|
||||||
color: "#a380e0",
|
color: "#a380e0",
|
||||||
value: new TagFilter(2),
|
value: new TagFilter(2, false),
|
||||||
icon: ServerCog
|
icon: ServerCog
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -81,8 +81,10 @@ export class TagFilter implements Filter {
|
|||||||
));
|
));
|
||||||
|
|
||||||
if (typeof result === "boolean")
|
if (typeof result === "boolean")
|
||||||
return new Promise((r) => r(!result))
|
return new Promise((r) => r(this.opposite ? !result : result))
|
||||||
|
|
||||||
return result;
|
return new Promise((r) => {
|
||||||
|
result.then((c) => r(this.opposite ? !c : c))
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user