fix: fix crash when unloading reminders plugin without running afterLoad()

This commit is contained in:
Dragory 2022-06-14 01:31:45 +03:00
parent b05fbe1d04
commit d60d2bc568
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -56,7 +56,7 @@ export const RemindersPlugin = zeppelinGuildPlugin<RemindersPluginType>()({
}, },
beforeUnload(pluginData) { beforeUnload(pluginData) {
pluginData.state.unregisterGuildEventListener(); pluginData.state.unregisterGuildEventListener?.();
pluginData.state.unloaded = true; pluginData.state.unloaded = true;
}, },
}); });