mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 15:58:31 +00:00
fix: Linter issues
This commit is contained in:
parent
c5d93fc637
commit
b27d9d72a0
2 changed files with 21 additions and 3 deletions
|
@ -92,13 +92,13 @@ export function getUserTimezone(discordID: string, strategy: CustomTimezonePrefe
|
|||
return new Promise(res => {
|
||||
const timezone = (DataStore.get(DATASTORE_KEY) as Promise<TimezoneDB | undefined>).then(tzs => tzs?.[discordID]);
|
||||
timezone.then(tz => {
|
||||
if (strategy == CustomTimezonePreference.Always) {
|
||||
if (strategy === CustomTimezonePreference.Always) {
|
||||
if (tz) res(tz);
|
||||
else res(undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tz && strategy == CustomTimezonePreference.Secondary)
|
||||
if (tz && strategy === CustomTimezonePreference.Secondary)
|
||||
res(tz);
|
||||
else {
|
||||
if (discordID in Cache) res(Cache[discordID]);
|
||||
|
@ -121,7 +121,7 @@ export const getAllTimezones = async (): Promise<string[]> => {
|
|||
if (typeof Intl !== "undefined" && "supportedValuesOf" in Intl) {
|
||||
try {
|
||||
// @ts-expect-error fuck you typescript
|
||||
return Intl.supportedValuesOf('timeZone');
|
||||
return Intl.supportedValuesOf("timeZone");
|
||||
} catch { }
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* Vencord, a modification for Discord's desktop app
|
||||
* Copyright (c) 2022 Vendicated and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/settings";
|
||||
import { OptionType } from "@utils/types";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue