Runtime exception on matrixParams
Closed this issue · 1 comments
Petesta commented
There is a runtime error when you call matrixParams
on an instance of Uri
.
$ sbt console
@ import com.netaporter.uri.dsl._
@ "https:/github.com"
res0: String = "https://github.com"
@ res0.matrixParams
java.lang.UnsupportedOperationException: empty.last
scala.collection.immutable.Vector.last(Vector.scala:203)
com.netaporter.uri.Uri.matrixParams(Uri.scala:36)
cmd49$.<init>(Main.scala:202)
cmd49$.<clinit>(Main.scala:-1)
@ "https://github.com/users"
res1: String = "https://github.com/users"
@ res1.matrixParams
res53: Parameters.ParamSeq = List()
I'll open a PR to resolve this issue and remove the runtime exception.
theon commented
Thanks for the PR. I have merged it 😄