Skip to content

Commit 50894e4

Browse files
committed
fix: ensure SemVer instanced passed as input are not modified
1 parent 9aefb66 commit 50894e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: functions/inc.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const inc = (version, release, options, identifier) => {
77
}
88

99
try {
10-
return new SemVer(version, options).inc(release, identifier).version
10+
return new SemVer(
11+
version instanceof SemVer ? version.version : version,
12+
options
13+
).inc(release, identifier).version
1114
} catch (er) {
1215
return null
1316
}

0 commit comments

Comments
 (0)