fix switching module

pull/1/head
yann300 6 years ago
parent 4bc8b68808
commit 98f8a89afb
  1. 3
      src/app/components/swap-panel-component.js

@ -34,12 +34,11 @@ class SwapPanelComponent {
showContent (moduleName) { showContent (moduleName) {
// hiding the current view and display the `moduleName` // hiding the current view and display the `moduleName`
if (moduleName === this.currentNode) return
if (this.contents[moduleName]) { if (this.contents[moduleName]) {
this.contents[moduleName].style.display = 'block'
if (this.currentNode) { if (this.currentNode) {
this.contents[this.currentNode].style.display = 'none' this.contents[this.currentNode].style.display = 'none'
} }
this.contents[moduleName].style.display = 'block'
this.currentNode = moduleName this.currentNode = moduleName
var item = this.store.getOne(moduleName) var item = this.store.getOne(moduleName)
this.header.innerHTML = item.profile ? item.profile.displayName : ' - ' this.header.innerHTML = item.profile ? item.profile.displayName : ' - '

Loading…
Cancel
Save