Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Sep 20, 2024
1 parent b2f6648 commit 7e5f946
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IParsedWorkbookData } from "../../convert/types";
interface IReportData {
path: string;
count: number;
size_kb?: number;
missing?: true;
}

Expand Down Expand Up @@ -46,7 +47,10 @@ export class AssetsSummaryReport {
const summaryData: IReportData[] = Object.entries(sortJsonKeys(this.reportSummary)).map(
([path, count]) => {
const entry: IReportData = { path, count };
if (!this.assetData.hasOwnProperty(path)) {
const assetDataEntry = this.assetData[path];
if (assetDataEntry) {
entry.size_kb = assetDataEntry.size_kb;
} else {
entry.missing = true;
}
return entry;
Expand All @@ -62,7 +66,7 @@ export class AssetsSummaryReport {
description:
"Assets that are used within sheets and also can be found in the synced asset data",
type: "table",
columns: ["path", "count"],
columns: ["path", "size_kb", "count"],
};

// Generate report summarising
Expand Down

0 comments on commit 7e5f946

Please sign in to comment.