fix(ui): unset last opened project if it is removed

This commit is contained in:
Guillaume Chau
2018-04-30 16:43:02 +02:00
parent d039af07be
commit 29e2d767a5
@@ -333,6 +333,9 @@ async function remove (id, context) {
currentProject = null
}
context.db.get('projects').remove({ id }).write()
if (context.db.get('config.lastOpenProject').value() === id) {
context.db.set('config.lastOpenProject', undefined).write()
}
return true
}