Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1225 from lift/dpp_issue_1225

Levenshtein distance in net.liftweb.util.LD - exception if first parameter is empty.
  • Loading branch information...
commit d6215e6c039f7d8bdd3dbafd738c5652e7dffe7e 2 parents a20bb12 + 648e52c
@dpp dpp authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/util/src/main/scala/net/liftweb/util/LD.scala
View
5 core/util/src/main/scala/net/liftweb/util/LD.scala
@@ -91,7 +91,10 @@ object LD {
new ListBuffer))
}
- matrix(y1, 0, (1 to x.length).toList).last
+ matrix(y1, 0, (1 to x.length).toList) match {
+ case Nil => 100000
+ case xs => xs.last
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.