Skip to content

Commit b210d01

Browse files
Merge pull request #773 from IATI/fix_null_report
Fix Validation Results page when containing null report
2 parents 6013129 + 87a1243 commit b210d01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/document.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export const getDocumentDownloadStatus = (document) => {
6767
export const getDocumentValidationStatus = (document) => {
6868
const { report } = document;
6969
const { valid } = report || { valid: null };
70-
const { error, warning, advisory } = report ? report.summary : { error: -1, warning: -1, advisory: -1 };
70+
const { error, warning, advisory } =
71+
report && report.summary ? report.summary : { error: -1, warning: -1, advisory: -1 };
7172

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

0 commit comments

Comments
 (0)