瀏覽代碼

get plugin id from string, not constructor.name

Artur Paikin 8 年之前
父節點
當前提交
c6adc0f286
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/plugins/Dashboard/index.js

+ 1 - 1
src/plugins/Dashboard/index.js

@@ -79,7 +79,7 @@ module.exports = class DashboardUI extends Plugin {
   }
 
   addTarget (plugin) {
-    const callerPluginId = plugin.constructor.name
+    const callerPluginId = plugin.id || plugin.constructor.name
     const callerPluginName = plugin.title || callerPluginId
     const callerPluginIcon = plugin.icon || this.opts.defaultTabIcon
     const callerPluginType = plugin.type