refactor: replace forEach with for-in loop in order summary

Change iteration method to properly skip unwanted properties and improve readability.
This commit is contained in:
danial
2025-08-24 11:30:30 +08:00
parent 883f2edf9c
commit d0dd6ccd9f

View File

@@ -1048,15 +1048,15 @@
},
});
let isloadSummary = false;
dataJSON.forEach((element) => {
for (let element in dataJSON) {
if (["currentPage", "displayCount"].includes(element)) {
return;
continue;
}
if (currentDataInfo[element] != dataJSON[element]) {
currentDataInfo[element] = dataJSON[element];
isloadSummary = true;
}
});
}
if (isloadSummary) {
AjaxOrderSummaryList(dataJSON);
}