Skip to content

Commit

Permalink
fix multiple bugs with query builder construction
Browse files Browse the repository at this point in the history
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 logseq#10263, fixes logseq#10264 and fixes logseq#9159
  • Loading branch information
logseq-cldwalker authored and andelf committed Nov 12, 2023
1 parent 1e87616 commit 57e759a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/frontend/components/query/builder.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 57e759a

Please sign in to comment.