aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorLewis Crichton <lewi@lewisakura.moe>2023-03-25 15:20:00 +0000
committerGitHub <noreply@github.com>2023-03-25 15:20:00 +0000
commit24aa90bd9cf20b5c0d668552f9fffec942db3948 (patch)
treeb7f22c9342ece66b61c534bd1f7d752602272b1e /src/plugins
parentc574f53417959dc061a7dcdd8cda24c92459dcd2 (diff)
downloadVencord-24aa90bd9cf20b5c0d668552f9fffec942db3948.tar.gz
Vencord-24aa90bd9cf20b5c0d668552f9fffec942db3948.tar.bz2
Vencord-24aa90bd9cf20b5c0d668552f9fffec942db3948.zip
fix API plugins being force enabled unconditionally (#704)
* only enable dependencies if required * fixme note
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/index.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/index.ts b/src/plugins/index.ts
index 6ac221d..d0d16c2 100644
--- a/src/plugins/index.ts
+++ b/src/plugins/index.ts
@@ -43,8 +43,11 @@ export function isPluginEnabled(p: string) {
const pluginsValues = Object.values(Plugins);
-// First roundtrip to mark and force enable dependencies
-for (const p of pluginsValues) {
+// First roundtrip to mark and force enable dependencies (only for enabled plugins)
+//
+// FIXME: might need to revisit this if there's ever nested (dependencies of dependencies) dependencies since this only
+// goes for the top level and their children, but for now this works okay with the current API plugins
+for (const p of pluginsValues) if (settings[p.name]?.enabled) {
p.dependencies?.forEach(d => {
const dep = Plugins[d];
if (dep) {