mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +00:00
Fix scanner for cljs
This commit is contained in:
parent
95ebdfa6a4
commit
ff20260f5f
1 changed files with 4 additions and 1 deletions
|
|
@ -61,7 +61,10 @@
|
||||||
|
|
||||||
(defn scanner [compiled-tries]
|
(defn scanner [compiled-tries]
|
||||||
"Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."
|
"Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."
|
||||||
#?(:cljs (fn [path] (some (fn [trie] (lookup trie path)) compiled-tries))
|
#?(:cljs (reify
|
||||||
|
Segment
|
||||||
|
(-lookup [_ ps params]
|
||||||
|
(some (fn [trie] (-lookup trie ps params)) compiled-tries)))
|
||||||
:clj (SegmentTrie/scanner compiled-tries)))
|
:clj (SegmentTrie/scanner compiled-tries)))
|
||||||
|
|
||||||
(defn lookup [trie path]
|
(defn lookup [trie path]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue