Fix: unregistring a plugin did not remove properly his hooks.
authorJohn Livingston <git@john-livingston.fr>
Thu, 16 Jan 2020 17:49:03 +0000 (18:49 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 20 Jan 2020 13:54:03 +0000 (14:54 +0100)
server/lib/plugins/plugin-manager.ts

index 8127992b59315d45a727a9608e26b07c525b2437..7ebdabd3456e1f3dcbd3e0af9128153ad733f96e 100644 (file)
@@ -194,7 +194,7 @@ export class PluginManager implements ServerHook {
 
       // Remove hooks of this plugin
       for (const key of Object.keys(this.hooks)) {
-        this.hooks[key] = this.hooks[key].filter(h => h.pluginName !== npmName)
+        this.hooks[key] = this.hooks[key].filter(h => h.npmName !== npmName)
       }
 
       this.reinitVideoConstants(plugin.npmName)