Skip to content

Commit

Permalink
fix(inc): ensure SemVer instanced passed as input are not modified
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed Apr 10, 2022
1 parent 74d0d86 commit 26dea17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/inc.js
Expand Up @@ -7,7 +7,10 @@ const inc = (version, release, options, identifier) => {
}

try {
return new SemVer(version, options).inc(release, identifier).version
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier).version
} catch (er) {
return null
}
Expand Down

0 comments on commit 26dea17

Please sign in to comment.