Skip to content

Commit

Permalink
Support any type of flow id
Browse files Browse the repository at this point in the history
Now, any value can be a flow id, not just a keyword.
The tradeoff is that we can't pass flows into some of our helper
functions, because a flow is a map and a map could simply be an
id.
  • Loading branch information
kimo-k committed Nov 14, 2023
1 parent 8f6b61e commit 62a571f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/re_frame/flow/alpha.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

(def flows (r/atom {}))

(defn lookup [x]
(cond
(flow? x) x
(id? x) (get @flows x)))
(defn lookup [id] (get @flows id))

(defn id [x]
(cond-> x (flow? x) :id))
Expand Down

0 comments on commit 62a571f

Please sign in to comment.