Browse Source

fix(references): block references crash (#6061)

* fix  #6057

* clear extra files

* format

* refactor

* use multi arity to simplify
sawhney17 3 years ago
parent
commit
dc380ad64d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/frontend/db/model.cljs

+ 3 - 1
src/main/frontend/db/model.cljs

@@ -1251,7 +1251,9 @@
 ;; TODO: Replace recursive queries with datoms index implementation
 ;; TODO: Replace recursive queries with datoms index implementation
 ;; see https://github.com/tonsky/datascript/issues/130#issuecomment-169520434
 ;; see https://github.com/tonsky/datascript/issues/130#issuecomment-169520434
 (defn get-block-referenced-blocks
 (defn get-block-referenced-blocks
-  ([block-uuid & options]
+  ([block-uuid]
+   (get-block-referenced-blocks block-uuid {:filter? false}))
+  ([block-uuid options]
    (when-let [repo (state/get-current-repo)]
    (when-let [repo (state/get-current-repo)]
      (when (conn/get-db repo)
      (when (conn/get-db repo)
        (let [block (db-utils/entity [:block/uuid block-uuid])
        (let [block (db-utils/entity [:block/uuid block-uuid])