Skip to content

Commit

Permalink
Don't assert when deleting non-existent object
Browse files Browse the repository at this point in the history
  • Loading branch information
eslick committed May 15, 2015
1 parent f1d7943 commit d2b9433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nativestore/core.cljs
Expand Up @@ -673,7 +673,6 @@
store)))

(delete! [store id]
(assert (contains? root id) "Exists")
(with-tracked-dependencies [update-listeners]
(when-let [old (get root id)]
(doseq [iname (js-keys indices)]
Expand All @@ -699,7 +698,8 @@
;; Ensure we've cleared everything (e.g. dependency ordering problems)
(doseq [iname (js-keys indices)]
(clear! (aget indices iname)))
(clear! root))
(clear! root)
store)

IIndexedStore
(add-index! [store iname index]
Expand Down

0 comments on commit d2b9433

Please sign in to comment.