summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dellinger <jonas@dellinger.dev>2022-06-20 15:54:31 +0200
committerJonas Dellinger <jonas@dellinger.dev>2022-06-20 15:54:31 +0200
commit3e250dd18044885a9864a41e710fce772eeb918b (patch)
tree4c3137c75f1180d2638f84b8b2490e32679c7b18
parent711af3bca352923901c48a4ceb7d9506545ec622 (diff)
downloaddecky-loader-3e250dd18044885a9864a41e710fce772eeb918b.tar.gz
decky-loader-3e250dd18044885a9864a41e710fce772eeb918b.zip
Fix importPlugin queue
-rw-r--r--frontend/src/plugin-loader.tsx13
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);