diff --git a/packages/sfp-cli/src/core/package/coverage/PackageVersionCoverage.ts b/packages/sfp-cli/src/core/package/coverage/PackageVersionCoverage.ts index bee874e13..d523e7209 100644 --- a/packages/sfp-cli/src/core/package/coverage/PackageVersionCoverage.ts +++ b/packages/sfp-cli/src/core/package/coverage/PackageVersionCoverage.ts @@ -9,8 +9,8 @@ export default class PackageVersionCoverage { const package2VersionFetcher = new Package2VersionFetcher(this.connection); const package2Version = await package2VersionFetcher.fetchBySubscriberPackageVersionId(versionId); SFPLogger.log(`Fetched Record ${JSON.stringify(package2Version)}`, LoggerLevel.TRACE, this.logger); + let packageCoverage = {}; if (package2Version) { - var packageCoverage = {}; packageCoverage.HasPassedCodeCoverageCheck = package2Version.HasPassedCodeCoverageCheck; packageCoverage.coverage = package2Version.CodeCoverage ? package2Version.CodeCoverage.apexCodeCoveragePercentage : 0; packageCoverage.packageId = package2Version.Package2Id;