From 9c21e13698960846b940d6297557b16fa92de7f6 Mon Sep 17 00:00:00 2001 From: Northword <44738481+northword@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:12:02 +0800 Subject: [PATCH] fix: notifier unregister when other plugin disabled (#221) --- src/modules/examples.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/examples.ts b/src/modules/examples.ts index a1dab01..7c0682c 100644 --- a/src/modules/examples.ts +++ b/src/modules/examples.ts @@ -44,8 +44,9 @@ export class BasicExampleFactory { ]); Zotero.Plugins.addObserver({ - shutdown: ({ id: pluginID }) => { - this.unregisterNotifier(notifierID); + shutdown: ({ id }) => { + if (id === addon.data.config.addonID) + this.unregisterNotifier(notifierID); }, }); }