diff --git a/lib/restore-utils/index.js b/lib/restore-utils/index.js index 0c6ecb1..0dca94d 100644 --- a/lib/restore-utils/index.js +++ b/lib/restore-utils/index.js @@ -209,6 +209,9 @@ const restore = async (options = {}) => { ) ); const success = await restoreBackedUpReport({ serverUrl: url, report: metadataReport }); + if (!(result in BACKUP_STATS)) { + BACKUP_STATS[result] = []; + } if (success) BACKUP_STATS[result].push(id); else BACKUP_STATS.failed.push(id); }