Skip to content

Commit

Permalink
如果是单例插件,不再初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-team-official committed Apr 26, 2024
1 parent 985146d commit 545942e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/plugin/service/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ export class PluginService extends BaseService {
instance = this.pluginCenterService.plugins.get(key);
} else {
instance = new (await this.pluginCenterService.plugins.get(key))();
await instance.init(pluginInfo, this.ctx, this.app, {
cache: this.midwayCache,
pluginService: this,
});
}
await instance.init(pluginInfo, this.ctx, this.app, {
cache: this.midwayCache,
pluginService: this,
});
return instance;
}

Expand Down

0 comments on commit 545942e

Please sign in to comment.