Commit c7879814 authored by Grandschtroumpf's avatar Grandschtroumpf

switch "getEntity" to "getOne"

parent 9e8d304b
......@@ -22,7 +22,7 @@ class SwapPanelComponent {
})
this.store.event.on('activate', (name) => {
const { profile, api } = this.store.getEntity(name)
const { profile, api } = this.store.getOne(name)
if (((profile.prefferedLocation === this.name) || (!profile.prefferedLocation && opt.default)) &&
profile.icon && api.render && typeof api.render === 'function') {
this.add(name, api.render())
......
......@@ -13,11 +13,11 @@ class VerticalIconComponent {
this.iconKind = {}
this.store.event.on('activate', (name) => {
const item = this.store.getEntity(name)
const item = this.store.getOne(name)
if (item && item.profile.icon && name !== 'code editor') this.addIcon(item.profile)
})
this.store.event.on('deactivate', (name) => {
const item = this.store.getEntity(name)
const item = this.store.getOne(name)
if (item && this.icons[name]) this.removeIcon(item.profile)
})
this.store.event.on('add', (entity) => { })
......
......@@ -20,7 +20,7 @@ export class RemixAppManager extends AppManagerApi {
}
setActive (name, isActive) {
const entity = this.getEntity(name)
const entity = this.getOne(name)
// temp
if (entity && name === 'solidity') {
isActive ? this.data.proxy.register(entity.api) : this.data.proxy.unregister(entity.api)
......@@ -32,7 +32,7 @@ export class RemixAppManager extends AppManagerApi {
}
getEntity (entityName) {
return this.store.getEntity(entityName)
return this.store.getOne(entityName)
}
addEntity (entity) {
......
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