diff --git a/apps/www/src/config/sl-mod-db.ts b/apps/www/src/config/sl-mod-db.ts index 6415626..2e03731 100644 --- a/apps/www/src/config/sl-mod-db.ts +++ b/apps/www/src/config/sl-mod-db.ts @@ -89,7 +89,7 @@ export const serverModDB: ModDBCategory[] = [ name: "Always Online", description: "All servers that are always online.", color: "#a380e0", - value: new TagFilter(2), + value: new TagFilter(2, false), icon: ServerCog } ] diff --git a/apps/www/src/lib/types/filters/tag-filter.ts b/apps/www/src/lib/types/filters/tag-filter.ts index 602366e..ae6a73b 100644 --- a/apps/www/src/lib/types/filters/tag-filter.ts +++ b/apps/www/src/lib/types/filters/tag-filter.ts @@ -81,8 +81,10 @@ export class TagFilter implements Filter { )); 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)) + }); } }