fix: check currentValue before generating newValue

This commit is contained in:
Rhys Arkins 2021-11-24 14:28:50 +01:00
parent f6454ba1a7
commit bb64598d6a

View file

@ -32,6 +32,7 @@ export function generateUpdate(
}
}
const { currentValue } = config;
if (currentValue) {
try {
update.newValue = versioning.getNewValue({
currentValue,
@ -46,6 +47,7 @@ export function generateUpdate(
);
update.newValue = currentValue;
}
}
update.newMajor = versioning.getMajor(newVersion);
update.newMinor = versioning.getMinor(newVersion);
// istanbul ignore if