fix API plugins being force enabled unconditionally (#704)
* only enable dependencies if required * fixme note
This commit is contained in:
parent
c574f53417
commit
24aa90bd9c
1 changed files with 5 additions and 2 deletions
|
@ -43,8 +43,11 @@ export function isPluginEnabled(p: string) {
|
||||||
|
|
||||||
const pluginsValues = Object.values(Plugins);
|
const pluginsValues = Object.values(Plugins);
|
||||||
|
|
||||||
// First roundtrip to mark and force enable dependencies
|
// First roundtrip to mark and force enable dependencies (only for enabled plugins)
|
||||||
for (const p of pluginsValues) {
|
//
|
||||||
|
// 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 => {
|
p.dependencies?.forEach(d => {
|
||||||
const dep = Plugins[d];
|
const dep = Plugins[d];
|
||||||
if (dep) {
|
if (dep) {
|
||||||
|
|
Loading…
Reference in a new issue