Vanessa 2023-12-26 16:47:26 +08:00
parent e52fae7fe0
commit 2232cec2bf
2 changed files with 5 additions and 1 deletions

View file

@ -65,7 +65,6 @@ export class Plugin {
}) {
this.app = options.app;
this.i18n = options.i18n;
this.name = options.name;
this.displayName = options.displayName;
this.eventBus = new EventBus(options.name);
}

View file

@ -64,6 +64,11 @@ const loadPluginJS = async (app: App, item: IPluginData) => {
name: item.name,
i18n: item.i18n
});
// https://github.com/siyuan-note/siyuan/issues/9943
Object.defineProperty(plugin, "name", {
value: item.name,
writable: false,
});
app.plugins.push(plugin);
try {
await plugin.onload();