Skip to content

Commit 6ebfce8

Browse files
committed
fix: tail
1 parent ef94df6 commit 6ebfce8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/datascript/storage.cljs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@
158158
:max-eid max-eid
159159
:max-tx max-tx})]
160160
(remember-db db)
161-
[db (mapv #(keep (fn [[e a v tx]]
162-
;; fix unique constraint
163-
(let [datom-exists? (some? (db/-datoms db :eavt e a v nil))
164-
;; retracted tx < 0
165-
added? (> tx 0)]
166-
(when-not (and datom-exists? added?)
167-
(db/datom e a v tx)))) %)
161+
[db (mapv #(mapv (fn [[e a v tx]] (db/datom e a v tx)) %)
168162
tail)]))))
169163

170164
(defn db-with-tail [db tail]

0 commit comments

Comments
 (0)