From c2ebff3e93e6a1520722e9b8fd18d48e4c1f33a1 Mon Sep 17 00:00:00 2001 From: redstonekasi Date: Wed, 8 Feb 2023 10:41:22 +0100 Subject: [PATCH] [Plugins] Properly await plugin start in initialization --- src/lib/plugins.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/plugins.ts b/src/lib/plugins.ts index c25e594..7ebdac0 100644 --- a/src/lib/plugins.ts +++ b/src/lib/plugins.ts @@ -123,8 +123,8 @@ export async function initPlugins() { await awaitSyncWrapper(plugins); const allIds = Object.keys(plugins); - await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled && plugins[pl].update).map(pl => fetchPlugin(pl))); - for (const pl of allIds.filter(pl => plugins[pl].enabled)) startPlugin(pl); + await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled && plugins[pl].update).map((pl) => fetchPlugin(pl))); + await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled).map((pl) => startPlugin(pl))); return stopAllPlugins; }