From c767449bbf0da53d6b104e73759cefce847361ba Mon Sep 17 00:00:00 2001 From: CloudHill Date: Thu, 3 Dec 2020 19:00:36 +0700 Subject: [PATCH] fix side panel mod being stuck outside the screen --- mods/side-panel/mod.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/side-panel/mod.js b/mods/side-panel/mod.js index 2bdb0ab..9a63b02 100644 --- a/mods/side-panel/mod.js +++ b/mods/side-panel/mod.js @@ -76,6 +76,7 @@ module.exports = { const attempt_interval = setInterval(enhance, 500); function enhance() { + if (!store().width) store().width = 220; let curPanel = {}; const frame = document.querySelector('.notion-frame'); @@ -143,8 +144,8 @@ module.exports = { }); // Restore lock state - if (store().locked === 'true') lockPanel(); - else unlockPanel(false); + if (store().locked === 'false') unlockPanel(false); + else lockPanel(); enableResize();