Skip to content

Commit

Permalink
adds error handling condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyassien committed Nov 30, 2024
1 parent 6f43776 commit 9fe64ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/homePage/uploadImage/DataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const DataTable = ({ selectedEval, id }) => {
setSaveBtnClass("white text-primary active");
}, [selectedEval]);

if (!selectedEval || !Object.keys(selectedEval).length) {
return;
}

const key = Object?.keys(selectedEval)[0];
let data = selectedEval[key];

Expand Down

0 comments on commit 9fe64ba

Please sign in to comment.