Unverified Commit 7fba5047 authored by yann300's avatar yann300 Committed by GitHub

Update swap-panel-component.js

parent 83e4561f
......@@ -22,10 +22,10 @@ class SwapPanelComponent {
})
this.store.event.on('activate', (name) => {
let item = this.store.get(name)
if (((item.profile.prefferedLocation === this.name) || (!item.profile.prefferedLocation && opt.default)) &&
item.profile.icon && item.api.render && typeof item.api.render === 'function') {
this.add(name, item.api.render())
const { profile, api } = this.store.get(name)
if (((profile.prefferedLocation === this.name) || (!profile.prefferedLocation && opt.default)) &&
profile.icon && api.render && typeof api.render === 'function') {
this.add(name, api.render())
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment