From 6cafd6598963948ca16ea495b2b20cd25f8640ee Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 8 Apr 2016 22:02:05 +0100 Subject: [PATCH] Fix editor closing incorrectly when an error occurs Fixes #558. --- src/gui/html/js/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js index a43901fc..d7fe3a51 100644 --- a/src/gui/html/js/events.js +++ b/src/gui/html/js/events.js @@ -479,7 +479,7 @@ function onEditorClose(evt) { the editor has been closed. */ promise = loot.query('editorClosed'); } - promise.then(() => { + promise.catch(handlePromiseError).then(() => { /* Remove body attribute so that sidebar items are styled correctly. */ document.body.removeAttribute('data-editors'); document.getElementById('cardsNav').notifyResize();