fix: notifier unregister when other plugin disabled (#221)

This commit is contained in:
Northword 2024-12-07 17:12:02 +08:00 committed by GitHub
parent 03b0db3a97
commit 9c21e13698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,8 @@ export class BasicExampleFactory {
]);
Zotero.Plugins.addObserver({
shutdown: ({ id: pluginID }) => {
shutdown: ({ id }) => {
if (id === addon.data.config.addonID)
this.unregisterNotifier(notifierID);
},
});