You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where I'm trying to coerce bar to a boolean. /foo/true is matched by this route, but /foo/false is not. What I'm guessing is happening is that because my coercion function is returning false, it is assumed to have failed. If I have that right, I think this is incorrect and only nil should be considered a failed match as indicated in the documentation here: https://github.com/weavejester/compojure/wiki/Destructuring-Syntax#parameter-coercion.
The text was updated successfully, but these errors were encountered:
Thanks for the report! I believe that's a bug. The problem is in on line 114 of core.clj, where and was used, instead of checking to see whether all the values were nil.
As an aside, however, Boolean/valueOf isn't a function, and so currently only works by happenstance. In Clojure static methods can't be treated the same as functions, because they're not objects.
I have a route like this
where I'm trying to coerce bar to a boolean.
/foo/true
is matched by this route, but/foo/false
is not. What I'm guessing is happening is that because my coercion function is returning false, it is assumed to have failed. If I have that right, I think this is incorrect and only nil should be considered a failed match as indicated in the documentation here: https://github.com/weavejester/compojure/wiki/Destructuring-Syntax#parameter-coercion.The text was updated successfully, but these errors were encountered: