diff options
-rw-r--r-- | lib/workers/repository/process/lookup/rollback.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/workers/repository/process/lookup/rollback.js b/lib/workers/repository/process/lookup/rollback.js index fb87cea4391..713b245399d 100644 --- a/lib/workers/repository/process/lookup/rollback.js +++ b/lib/workers/repository/process/lookup/rollback.js @@ -38,6 +38,11 @@ function getRollbackUpdate(config, versions) { ); lessThanVersions.sort(sortVersions); const toVersion = lessThanVersions.pop(); + // istanbul ignore if + if (!toVersion) { + logger.info('No toVersion to roll back to'); + return null; + } let fromVersion; const newValue = getNewValue(currentValue, 'replace', fromVersion, toVersion); return { |