Fix importPlugin queue

This commit is contained in:
Jonas Dellinger
2022-06-20 15:54:31 +02:00
parent 711af3bca3
commit 3e250dd180
+2 -1
View File
@@ -79,13 +79,14 @@ class PluginLoader extends Logger {
} }
public async importPlugin(name: string) { public async importPlugin(name: string) {
try {
if (this.reloadLock) { if (this.reloadLock) {
this.log('Reload currently in progress, adding to queue', name); this.log('Reload currently in progress, adding to queue', name);
this.pluginReloadQueue.push(name); this.pluginReloadQueue.push(name);
return; return;
} }
try {
this.reloadLock = true;
this.log(`Trying to load ${name}`); this.log(`Trying to load ${name}`);
const oldPlugin = this.plugins.find((plugin) => plugin.name === name); const oldPlugin = this.plugins.find((plugin) => plugin.name === name);