This commit is contained in:
Pradeeppon01 2024-07-04 13:50:40 +05:30
parent a2efb769de
commit d7c1927bb1
1 changed files with 3 additions and 2 deletions

View File

@ -94,7 +94,7 @@ function AnomalyPartC() {
if (!reduxSystemNo) { if (!reduxSystemNo) {
setShowSystemNoContainer(true); setShowSystemNoContainer(true);
} else { } else {
if (evErrorsList.length > 0) { if (evErrorsList && evErrorsList.length > 0) {
setAnomalyData(evErrorsList); setAnomalyData(evErrorsList);
} else { } else {
fetchAnomalyData(); fetchAnomalyData();
@ -106,7 +106,7 @@ function AnomalyPartC() {
if (!reduxSystemNo) { if (!reduxSystemNo) {
setShowSystemNoContainer(true); setShowSystemNoContainer(true);
} else { } else {
if (evErrorsData.length > 0) { if (evErrorsData && evErrorsData.length > 0) {
setEvErrors(evErrorsData); setEvErrors(evErrorsData);
} }
if (error && errorReason) { if (error && errorReason) {
@ -222,6 +222,7 @@ function AnomalyPartC() {
function getRecordsBySystemId(records, systemId) { function getRecordsBySystemId(records, systemId) {
const new_data = []; const new_data = [];
if(!records) records = []
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
var count = i % 5; var count = i % 5;
if (count === systemId - 1) { if (count === systemId - 1) {