From 57e759aad1c1f6ec230c7fd4ab80e7ac627a04fc Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Thu, 9 Nov 2023 13:52:03 -0500 Subject: [PATCH] fix multiple bugs with query builder construction Bug was caused by query string updates relying on q-str which is only valid on initial render. Subsequent changes changes to query caused bugs fixes #10263, fixes #10264 and fixes #9159 --- src/main/frontend/components/query/builder.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/query/builder.cljs b/src/main/frontend/components/query/builder.cljs index f5ac7fe6d..9c3a92b3f 100644 --- a/src/main/frontend/components/query/builder.cljs +++ b/src/main/frontend/components/query/builder.cljs @@ -449,8 +449,8 @@ block (db/pull [:block/uuid (:block/uuid block)])] (when block (let [content (string/replace (:block/content block) - (util/format "{{query %s" q-str) - (util/format "{{query %s" q))] + #"\{\{query[^}]+\}\}" + (util/format "{{query %s}}" q))] (editor-handler/save-block! repo (:block/uuid block) content))))))) (assoc state ::tree *tree))) :will-mount (fn [state]