Browse Source

fix: history e2e tests

Tienson Qin 1 year ago
parent
commit
774a159451
1 changed files with 2 additions and 1 deletions
  1. 2 1
      deps/db/src/logseq/db.cljs

+ 2 - 1
deps/db/src/logseq/db.cljs

@@ -74,7 +74,8 @@
   ([conn tx-data]
   ([conn tx-data]
    (transact! conn tx-data nil))
    (transact! conn tx-data nil))
   ([conn tx-data tx-meta]
   ([conn tx-data tx-meta]
-   (let [tx-data (common-util/fast-remove-nils tx-data)
+   (let [tx-data (->> (common-util/fast-remove-nils tx-data)
+                      (remove empty?))
          request-finished? (request-finished?)]
          request-finished? (request-finished?)]
      ;; Ensure worker can handle the request sequentially (one by one)
      ;; Ensure worker can handle the request sequentially (one by one)
      ;; Because UI assumes that the in-memory db has all the data except the last one transaction
      ;; Because UI assumes that the in-memory db has all the data except the last one transaction