session: fix lobby not shown when failing to load a session
This commit is contained in:
parent
e339c1aa49
commit
be5f920c23
3 changed files with 14 additions and 10 deletions
|
|
@ -5,7 +5,8 @@
|
|||
- bug fixes
|
||||
- error when resizing a widget and its clone(s) at the same time
|
||||
- error with non string css property
|
||||
|
||||
- session list not reappearing when failing to load
|
||||
|
||||
## 0.27.0
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -36,13 +36,18 @@ var SessionManager = class SessionManager {
|
|||
try {
|
||||
parser.reset()
|
||||
|
||||
if (session[0].type != 'root') {
|
||||
this.session = [{type:'root', tabs:session}]
|
||||
} else if (session[0].type == 'root'){
|
||||
this.session = session
|
||||
} else {
|
||||
this.lock = false
|
||||
try {
|
||||
|
||||
if (session[0].type != 'root') {
|
||||
this.session = [{type:'root', tabs:session}]
|
||||
} else if (session[0].type == 'root'){
|
||||
this.session = session
|
||||
}
|
||||
|
||||
} catch(err) {
|
||||
|
||||
throw new Error('Malformed session file')
|
||||
|
||||
}
|
||||
|
||||
parser.parse(this.session, DOM.get('#container')[0])
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ class Lobby {
|
|||
if (!this.state) return
|
||||
this.state = 0
|
||||
this.main.classList.remove('show')
|
||||
setTimeout(()=>{
|
||||
document.body.removeChild(this.html)
|
||||
}, 100)
|
||||
document.body.removeChild(this.html)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue