From 19d6e9727f3f96dc155e2cfd504b65079c61ef36 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 6 Sep 2022 09:09:59 +0800 Subject: [PATCH] fix: document/mode? is in state not in config --- src/main/frontend/state.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/frontend/state.cljs b/src/main/frontend/state.cljs index b67da1fa77..ecaae8af62 100644 --- a/src/main/frontend/state.cljs +++ b/src/main/frontend/state.cljs @@ -488,6 +488,8 @@ should be done through this fn in order to get global config and config defaults ;; State cursor fns for use with rum components ;; ============================================ +(declare document-mode?) + (defn sub "Creates a rum cursor, https://github.com/tonsky/rum#cursors, for use in rum components. Similar to re-frame subscriptions" @@ -605,9 +607,8 @@ Similar to re-frame subscriptions" (defn doc-mode-enter-for-new-line? [] - (let [config (sub-config)] - (and (:document/mode? config) - (not (:shortcut/doc-mode-enter-for-new-block? config))))) + (and (document-mode?) + (not (:shortcut/doc-mode-enter-for-new-block? (get-config))))) (defn user-groups []