Replaced the forEach loops with the for-of loops in the JavaScript for the currency form, account form, and the drag-and-drop reorder library functions.

This commit is contained in:
2023-02-28 22:09:39 +08:00
parent bb7e9e94ee
commit 08dc24605d
3 changed files with 15 additions and 15 deletions

@ -65,9 +65,9 @@ function validateForm() {
*/
function submitFormIfAllAsyncValid() {
let isValid = true;
Object.keys(isAsyncValid).forEach(function (key) {
for (const key of Object.keys(isAsyncValid)) {
isValid = isAsyncValid[key] && isValid;
});
}
if (isValid) {
document.getElementById("accounting-form").submit()
}