session: fix lobby not shown when failing to load a session

This commit is contained in:
jean-emmanuel 2018-03-20 09:15:49 +01:00
parent c50351131e
commit 3415e19843
3 changed files with 14 additions and 10 deletions

View file

@ -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

View file

@ -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])

View file

@ -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)
}
}