Skip to content

Commit 2dd2b94

Browse files
committed
fix: use weakref on stored-dbs
1 parent b28f657 commit 2dd2b94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datascript/storage.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
(atom []))
8787

8888
(defn- remember-db [db]
89-
(swap! stored-dbs conj db))
89+
(swap! stored-dbs conj (js/WeakRef. db)))
9090

9191
(defn store-impl! [db adapter force?]
9292
(locking (:storage adapter)

0 commit comments

Comments
 (0)