input-output-hk / dapps-certification-web

Certification as a service for the Cardano dApps platform
Apache License 2.0
5 stars 0 forks source link

PLT-7800 Only shows properties that are present and not undefined/null/[] #33

Closed amnambiar closed 1 year ago

amnambiar commented 1 year ago

https://input-output.atlassian.net/browse/PLT-7800

BE: master

Summary by CodeRabbit

coderabbitai[bot] commented 1 year ago

Walkthrough

The recent modification enhances the robustness of the processData function in handling data objects. It now ensures that not only does the data object exist, but also checks if it's an array with at least one element, thereby improving the handling of empty arrays.

Changes

File Summary
.../certification-result/fullReportTable.helper.tsx The processData function has been updated to check if dataObj is not null or undefined, and if it's an array, it verifies that it contains at least one element. This change improves the handling of empty arrays.

🐇💻

In the land of code, where logic resides,

A rabbit hops, with wisdom as his guide.

Arrays once empty, no longer slide,

Through conditions unchecked, they no longer hide.

Celebrate this change, for it's a stride,

Towards a codebase, in which we take pride. 🎉🥕

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume. - Additionally, enter `@coderabbitai pause` to halt the bot's ongoing reviews as any issue or review comment. To resume reviews, enter `@coderabbitai resume` as any issue or review comment.