Skip to content

Commit

Permalink
fix(core): Move plugins init to promise.
Browse files Browse the repository at this point in the history
This should fix regression caused by
bd6ea70.
  • Loading branch information
SpacingBat3 committed Jul 14, 2024
1 parent bd6ea70 commit 9915270
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/api/core/src/util/plugin-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export default class PluginInterface implements IForgePluginInterface {
})
).then((plugins) => {
this.plugins = plugins;
for (const plugin of this.plugins) {
plugin.init(dir, forgeConfig);
}
return;
});
// TODO: fix hack
Expand All @@ -71,11 +74,6 @@ export default class PluginInterface implements IForgePluginInterface {
configurable: false,
writable: false,
});

for (const plugin of this.plugins) {
plugin.init(dir, forgeConfig);
}

this.triggerHook = this.triggerHook.bind(this);
this.overrideStartLogic = this.overrideStartLogic.bind(this);
}
Expand Down

0 comments on commit 9915270

Please sign in to comment.