aboutsummaryrefslogtreecommitdiff
path: root/src/Vencord.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Vencord.ts')
-rw-r--r--src/Vencord.ts38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts
index 4800621..659d032 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -17,12 +17,6 @@ import { checkForUpdates, UpdateLogger } from "./utils/updater";
import { onceReady } from "./webpack";
import { Router } from "./webpack/common";
-Object.defineProperty(window, "IS_WEB", {
- get: () => !window.DiscordNative,
- configurable: true,
- enumerable: true
-});
-
export let Components: any;
async function init() {
@@ -30,21 +24,23 @@ async function init() {
startAllPlugins();
Components = await import("./components");
- try {
- const isOutdated = await checkForUpdates();
- if (isOutdated && Settings.notifyAboutUpdates)
- setTimeout(() => {
- showNotice(
- "A Vencord update is available!",
- "View Update",
- () => {
- popNotice();
- Router.open("VencordUpdater");
- }
- );
- }, 10000);
- } catch (err) {
- UpdateLogger.error("Failed to check for updates", err);
+ if (!IS_WEB) {
+ try {
+ const isOutdated = await checkForUpdates();
+ if (isOutdated && Settings.notifyAboutUpdates)
+ setTimeout(() => {
+ showNotice(
+ "A Vencord update is available!",
+ "View Update",
+ () => {
+ popNotice();
+ Router.open("VencordUpdater");
+ }
+ );
+ }, 10000);
+ } catch (err) {
+ UpdateLogger.error("Failed to check for updates", err);
+ }
}
}