From 50894e4aa6608e652919524e342e0882610738f4 Mon Sep 17 00:00:00 2001 From: Louis Bompart Date: Thu, 27 Jan 2022 21:51:56 -0500 Subject: [PATCH] fix: ensure SemVer instanced passed as input are not modified --- functions/inc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/inc.js b/functions/inc.js index aa4d83ab..62d1da2c 100644 --- a/functions/inc.js +++ b/functions/inc.js @@ -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 }