mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 04:28:07 +01:00
This commit is contained in:
parent
da0afd39a8
commit
a556716dcc
7 changed files with 35 additions and 22 deletions
|
|
@ -7,7 +7,11 @@ export const uninstall = (app: App, name: string) => {
|
|||
app.plugins.find((plugin: Plugin, index) => {
|
||||
if (plugin.name === name) {
|
||||
// rm command
|
||||
plugin.onunload();
|
||||
try {
|
||||
plugin.onunload();
|
||||
} catch (e) {
|
||||
console.error(`plugin ${plugin.name} onunload error:`, e);
|
||||
}
|
||||
// rm tab
|
||||
const modelsKeys = Object.keys(plugin.models);
|
||||
getAllModels().custom.forEach(custom => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue