Skip to content

Commit

Permalink
fix legacy plugin duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Jul 1, 2022
1 parent aa4f1b1 commit 934a50f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/plugin-loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class PluginLoader extends Logger {
this.reloadLock = true;
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) {
oldPlugin.onDismount?.();
this.plugins = this.plugins.filter((plugin) => plugin !== oldPlugin);
Expand Down

0 comments on commit 934a50f

Please sign in to comment.