From 953cc327c68e59b5eab433342499d6f76181f9ab Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 24 Sep 2018 07:10:00 +0100 Subject: [PATCH] Electron: Fixes #805: Fixed app freezing when opening note in external editor and then creating new note --- ElectronClient/app/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index 79dc737b50..43ca07e9da 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -166,8 +166,10 @@ class Application extends BaseApplication { case 'NOTE_FILE_WATCHER_CLEAR': - newState = Object.assign({}, state); - newState.watchedNoteFiles = []; + if (state.watchedNoteFiles.length) { + newState = Object.assign({}, state); + newState.watchedNoteFiles = []; + } break; }