From b344e2c1521184bb8dabf27d3106713ed4a38535 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Fri, 23 Aug 2024 18:46:41 -0400 Subject: [PATCH] fix: can't expand block ref when navigating to original block (a common workflow in file graphs). Also fixes not expanding ref in sidebar --- src/main/frontend/components/block.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index c02d444cf..87bfddaa5 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -2544,7 +2544,8 @@ current-block-page? (= (str (:block/uuid block)) (state/get-current-page)) embed-self? (and (:embed? config) (= (:block/uuid block) (:block/uuid (:block config)))) - default-hide? (not (and current-block-page? (not embed-self?) (state/auto-expand-block-refs?))) + default-hide? (or (not (and current-block-page? (not embed-self?) (state/auto-expand-block-refs?))) + (= (str (:id config)) (str (:block/uuid block)))) *refs-count (atom nil)] (p/let [count (db-async/ refs-count 0) - (not= (str (:id config)) (str (:block/uuid block)))) + (> refs-count 0)) (when-let [refs-cp (state/get-component :block/linked-references)] (refs-cp uuid)))]]))