From 9f8be31b654fe155a3affa7f94351f4914552c36 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 8 Feb 2018 01:39:25 +0100 Subject: [PATCH] Execute the callback in StorageManager even with an empty storage Basically, without it the `postLoad` in modules is not called. Faced it because the undo manager was not working --- src/storage_manager/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/storage_manager/index.js b/src/storage_manager/index.js index ff8d8082e..a68bd2e7b 100644 --- a/src/storage_manager/index.js +++ b/src/storage_manager/index.js @@ -193,7 +193,7 @@ module.exports = () => { for (var i = 0, len = keys.length; i < len; i++) keysF.push(c.id + keys[i]); - st && + if (st) { st.load(keysF, res => { // Restore keys name var reg = new RegExp('^' + c.id + ''); @@ -204,6 +204,9 @@ module.exports = () => { clb && clb(result); }); + } else { + clb && clb(result); + } }, /**