Skip to content

Commit

Permalink
handle passing in nil a bit more graciously
Browse files Browse the repository at this point in the history
  • Loading branch information
Kah0ona committed Apr 4, 2019
1 parent e6f4a64 commit 8af3d47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject re-dnd "0.1.4"
(defproject re-dnd "0.1.5"
:description "A configurable drag/drop widget + API for re-frame apps"
:url "https://github.com/Kah0ona/re-dnd.git"
:license {:name "MIT"}
Expand Down
3 changes: 1 addition & 2 deletions src/cljs/re_dnd/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@
(re-frame/reg-event-db
:dnd/move-drop-zone-element
(fn [db [_ dz-id e-id new-pos]]
(debug new-pos)
(update-in db [:dnd/state :drop-zones dz-id] move-element-in-list e-id new-pos)))
(update-in db [:dnd/state :drop-zones dz-id] move-element-in-list e-id (or new-pos 0))))

(re-frame/reg-event-db
:dnd/add-drop-zone-element
Expand Down

0 comments on commit 8af3d47

Please sign in to comment.