Skip to content

Commit

Permalink
Avoid errors if version key not present in config record
Browse files Browse the repository at this point in the history
  • Loading branch information
anero committed Oct 12, 2022
1 parent 99b4df4 commit 879d651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function handler(event, context) {
*/
function upgradeConfig(s3Info, currentConfig, callback) {
// v 1.x to 2.x upgrade for multi-cluster loaders
if (semver.lt(currentConfig.version.S, pjson.version)) {
if (currentConfig.version && semver.lt(currentConfig.version.S, pjson.version)) {
logger.debug(`Performing version upgrade from ${currentConfig.version.S} to ${pjson.version}`);
upgrade.upgradeAll(dynamoDB, s3Info, currentConfig, callback);
} else {
Expand Down

0 comments on commit 879d651

Please sign in to comment.