Skip to content

Commit

Permalink
Fix the Javascript Reverse router. Problem with default values.
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort authored and jroper committed Mar 25, 2013
1 parent 9cbcd20 commit 41f873a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ object RoutesCompiler {
queryParams.map { p =>
("(\"\"\" + implicitly[QueryStringBindable[" + p.typeName + "]].javascriptUnbind + \"\"\")" + """("""" + p.name + """", """ + localNames.get(p.name).getOrElse(p.name) + """)""") -> p
}.map {
case (u, Parameter(name, typeName, None, Some(default))) => """(""" + localNames.get(name).getOrElse(name) + " == null ? \"\"\" + implicitly[JavascriptLitteral[" + typeName + "]].to(" + default + ") + \"\"\" : " + u + ")"
case (u, Parameter(name, typeName, None, Some(default))) => """(""" + localNames.get(name).getOrElse(name) + " == null ? null : " + u + ")"
case (u, Parameter(name, typeName, None, None)) => u
}.mkString(", "))

Expand Down

0 comments on commit 41f873a

Please sign in to comment.