Skip to content
Snippets Groups Projects
Commit 41b0517e authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: check currentValue before updating newValue

parent eed98265
Branches
Tags 12.51.9
No related merge requests found
...@@ -32,6 +32,7 @@ export function generateUpdate( ...@@ -32,6 +32,7 @@ export function generateUpdate(
} }
} }
const { currentValue } = config; const { currentValue } = config;
if (currentValue) {
try { try {
update.newValue = versioning.getNewValue({ update.newValue = versioning.getNewValue({
currentValue, currentValue,
...@@ -46,6 +47,9 @@ export function generateUpdate( ...@@ -46,6 +47,9 @@ export function generateUpdate(
); );
update.newValue = currentValue; update.newValue = currentValue;
} }
} else {
update.newValue = currentValue;
}
update.newMajor = versioning.getMajor(newVersion); update.newMajor = versioning.getMajor(newVersion);
update.newMinor = versioning.getMinor(newVersion); update.newMinor = versioning.getMinor(newVersion);
// istanbul ignore if // istanbul ignore if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment