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