Skip to content

Commit

Permalink
解决 pluginRunTime.pluginName 是 undefined (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
ylx252 authored May 10, 2024
1 parent 8717a66 commit 964977d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Editor extends EventEmitter {
if (this._checkPlugin(plugin) && this.canvas) {
this._saveCustomAttr(plugin);
const pluginRunTime = new plugin(this.canvas, this, options || {}) as IPluginClass;
// 添加插件名称
pluginRunTime.pluginName = plugin.pluginName;
this.pluginMap[plugin.pluginName] = pluginRunTime;
this._bindingHooks(pluginRunTime);
this._bindingHotkeys(pluginRunTime);
Expand Down

0 comments on commit 964977d

Please sign in to comment.