Skip to content

Commit

Permalink
fix ref were defined after use
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic committed Nov 28, 2024
1 parent 3c005d0 commit 0458752
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ async function run() {
core.startGroup("Load reports");
core.info(`Loading reports from "${localReportPath}"`);
const compareContent = fs.readFileSync(localReportPath, "utf8");
referenceContent ??= compareContent; // if no source reports were loaded, defaults to the current reports

if (memory_report) {
core.info(`Format Memory markdown rows`);
Expand All @@ -126,8 +127,6 @@ async function run() {
return;
}

referenceContent ??= compareContent; // if no source reports were loaded, defaults to the current reports

core.info(`Mapping compared reports`);
const compareReports = loadReports(compareContent);
core.info(`Got ${compareReports.programs.length} compare programs`);
Expand Down

0 comments on commit 0458752

Please sign in to comment.