From ef4627e39f9746fe27238c862294df94ab4e164b Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 2 Sep 2013 00:45:48 +1000 Subject: Fix an issue relating to vars in the context macro --- src/reverse_routing/core.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/reverse_routing/core.clj') diff --git a/src/reverse_routing/core.clj b/src/reverse_routing/core.clj index 377d75e..2907fb4 100644 --- a/src/reverse_routing/core.clj +++ b/src/reverse_routing/core.clj @@ -43,7 +43,8 @@ path-keys (vec (:keys (clout.core/route-compile string-path))) keylen (count path-keys) lookup-fn `(fn [[route-name# args-count#]] - (let [r# (#'lookup-route [route-name# (- args-count# ~keylen)] + (let [~args (repeat nil) ;; hacky, but necessary - provide nil values for args + r# (#'lookup-route [route-name# (- args-count# ~keylen)] ~@routes) {uri# :uri, args# :args} r#] (if r# -- cgit v1.2.3