Skip to content

Commit

Permalink
Merge 787fb8a into 6086e5a
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjing76 committed Dec 19, 2018
2 parents 6086e5a + 787fb8a commit f5f5d54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ function intersects (r1, r2, options) {
}

exports.coerce = coerce
function coerce (version) {
function coerce (version, options) {
if (version instanceof SemVer) { return version }

if (typeof version !== 'string') { return null }
Expand All @@ -1235,5 +1235,5 @@ function coerce (version) {

if (match == null) { return null }

return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'))
return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'), options)
}

0 comments on commit f5f5d54

Please sign in to comment.