From c21fe3e2f184813687050017ae7df7d7df70a80c Mon Sep 17 00:00:00 2001 From: CloudHill Date: Mon, 14 Dec 2020 20:42:39 +0700 Subject: [PATCH] simpler databases: fix initialization of store variables --- mods/simpler-databases/mod.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/simpler-databases/mod.js b/mods/simpler-databases/mod.js index 5bfcbca..3ec95ab 100644 --- a/mods/simpler-databases/mod.js +++ b/mods/simpler-databases/mod.js @@ -18,6 +18,8 @@ module.exports = { author: 'CloudHill', hacks: { 'renderer/preload.js'(store, __exports) { + if (!store().blocks) store().blocks = {}; + const menuItems = [ { key: 'replace_title', @@ -429,7 +431,7 @@ module.exports = { function getView(collection) { return collection.querySelector('.notion-scroller [class$="view"]') - .className.split('-')[1] + ?.className.split('-')[1] } // add/remove keys to data-tweaks