Skip to content

Commit

Permalink
Don't try to parse null ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 18, 2011
1 parent 0191039 commit c59b93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion semver.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var starExpression = /(<|>)?=?\s*\*/g
, compTrimReplace = "$1$3" , compTrimReplace = "$1$3"


function toComparators (range) { function toComparators (range) {
return range.trim() return (range || "").trim()
.replace(expressions.parseRange, exports.rangeReplace) .replace(expressions.parseRange, exports.rangeReplace)
.split(/\s+/) .split(/\s+/)
.map(replaceSpermies) .map(replaceSpermies)
Expand Down

0 comments on commit c59b93a

Please sign in to comment.