hot-reload: clean backup only after it's been consumed

This commit is contained in:
jean-emmanuel 2018-10-20 15:23:01 +02:00
parent 274a035ea9
commit cb13fcafde
2 changed files with 14 additions and 2 deletions

View file

@ -140,12 +140,19 @@ module.exports = {
loadBackup: function(data) {
session.load(data.session, ()=>{
state.set(data.state, false)
editor.historySession = deepCopy(data.session)
editor.history = data.history
editor.historyState = data.historyState
if (data.sidepanelOpened) sidepanel.open()
if (data.editorEnabled) editor.enable()
if (data.sidepanelOpened) sidepanel.open()
ipc.send('deleteBackup', data.backupId)
})
}