Skip to content

Commit

Permalink
Merge pull request #773 from IATI/fix_null_report
Browse files Browse the repository at this point in the history
Fix Validation Results page when containing null report
  • Loading branch information
tillywoodfield authored Oct 23, 2024
2 parents 6013129 + 87a1243 commit b210d01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const getDocumentDownloadStatus = (document) => {
export const getDocumentValidationStatus = (document) => {
const { report } = document;
const { valid } = report || { valid: null };
const { error, warning, advisory } = report ? report.summary : { error: -1, warning: -1, advisory: -1 };
const { error, warning, advisory } =
report && report.summary ? report.summary : { error: -1, warning: -1, advisory: -1 };

if (document.report === null) {
return { value: "normal", caption: "N/A" };
Expand Down

0 comments on commit b210d01

Please sign in to comment.