[Plugins] Properly handle errors in UI
This commit is contained in:
parent
a039d183b7
commit
77dd4503b7
2 changed files with 12 additions and 4 deletions
|
@ -100,7 +100,7 @@ export function stopPlugin(id: string, disable = true) {
|
|||
if (!pluginRet) throw new Error("Attempted to stop a non-started plugin");
|
||||
|
||||
try {
|
||||
loadedPlugins[plugin.id]?.onUnload?.();
|
||||
pluginRet.onUnload?.();
|
||||
} catch(e) {
|
||||
logger.error(`Plugin ${plugin.id} errored whilst unloading`, e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue