From 861a26a95989788a29d65cfcc54f0460dce61368 Mon Sep 17 00:00:00 2001 From: Nickyux Date: Mon, 21 Nov 2022 16:49:17 +0100 Subject: Fix logic --- src/components/PluginSettings/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 4fa2c44..58b1f87 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -247,7 +247,7 @@ export default ErrorBoundary.wrap(function Settings() { ); }; - const [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("Vencord_existingPlugins").then((existingPlugins: Record | null) => { + const [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("Vencord_existingPlugins").then((existingPlugins: Record) => { logger.info("called func"); const dateNow: number = Date.now() / 1000; logger.debug("dateNow", dateNow); @@ -260,7 +260,7 @@ export default ErrorBoundary.wrap(function Settings() { logger.debug(plugin.name); Vencord_existingPlugins[plugin.name] = Object.keys(existingPlugins ? existingPlugins : []).includes(plugin.name) ? existingPlugins[plugin.name] : dateNow; logger.debug("1"); - if (Vencord_existingPlugins[plugin.name] < (dateNow + 172800)) { + if ((Vencord_existingPlugins[plugin.name] + 172800) > dateNow) { newPlugins.push(plugin.name); } }); -- cgit