mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 19:21:59 +00:00
fix legacy plugin duplication
This commit is contained in:
@@ -89,7 +89,9 @@ class PluginLoader extends Logger {
|
|||||||
this.reloadLock = true;
|
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 || plugin.name === name.replace('$LEGACY_', ''),
|
||||||
|
);
|
||||||
if (oldPlugin) {
|
if (oldPlugin) {
|
||||||
oldPlugin.onDismount?.();
|
oldPlugin.onDismount?.();
|
||||||
this.plugins = this.plugins.filter((plugin) => plugin !== oldPlugin);
|
this.plugins = this.plugins.filter((plugin) => plugin !== oldPlugin);
|
||||||
|
|||||||
Reference in New Issue
Block a user