Skip to content

Commit

Permalink
maxSatisfying() should return null if no versions satisfy the range. F…
Browse files Browse the repository at this point in the history
…ixes #20
  • Loading branch information
sethkinast authored and Seth Kinast committed Mar 6, 2013
1 parent 3c764e4 commit 1fddc26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion semver.js
Expand Up @@ -197,7 +197,7 @@ function maxSatisfying (versions, range) {
return versions
.filter(function (v) { return satisfies(v, range) })
.sort(compare)
.pop()
.pop() || null
}
function satisfies (version, range) {
version = valid(version)
Expand Down

0 comments on commit 1fddc26

Please sign in to comment.