diff options
| author | Jonas Dellinger <jonas@dellinger.dev> | 2022-06-20 15:54:31 +0200 |
|---|---|---|
| committer | Jonas Dellinger <jonas@dellinger.dev> | 2022-06-20 15:54:31 +0200 |
| commit | 3e250dd18044885a9864a41e710fce772eeb918b (patch) | |
| tree | 4c3137c75f1180d2638f84b8b2490e32679c7b18 | |
| parent | 711af3bca352923901c48a4ceb7d9506545ec622 (diff) | |
| download | decky-loader-3e250dd18044885a9864a41e710fce772eeb918b.tar.gz decky-loader-3e250dd18044885a9864a41e710fce772eeb918b.zip | |
Fix importPlugin queue
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index b8729168..442db3e4 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -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); |
