Fix importPlugin queue

This commit is contained in:
Jonas Dellinger
2022-06-20 15:54:31 +02:00
parent 711af3bca3
commit 3e250dd180

View File

@@ -79,13 +79,14 @@ class PluginLoader extends Logger {
}
public async importPlugin(name: string) {
try {
if (this.reloadLock) {
this.log('Reload currently in progress, adding to queue', name);
this.pluginReloadQueue.push(name);
return;
}
if (this.reloadLock) {
this.log('Reload currently in progress, adding to queue', name);
this.pluginReloadQueue.push(name);
return;
}
try {
this.reloadLock = true;
this.log(`Trying to load ${name}`);
const oldPlugin = this.plugins.find((plugin) => plugin.name === name);