Commit 98f8a89a authored by yann300's avatar yann300

fix switching module

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