Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
SrijanSao committed Nov 6, 2024
1 parent a5aba51 commit 30ce76f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/FormList.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function MLFormList$validateModel (callback, invalidControls) {

_.eachKey(this._dataValidations.fromModel, function (validators, modelPath) {
const [index, path] = modelPath.split('.');
var data = this.model.m().get()[index][path];
const data = this.model.m().get()[index][path];
validators = Array.isArray(validators) ? validators : [validators];

if (validators && validators.length) {
Expand All @@ -164,7 +164,7 @@ function MLFormList$validateModel (callback, invalidControls) {
let allValid = true;
async.each(validations,
function (validation, nextValidation) {
var lastResponse;
let lastResponse;
async.every(validation.validators,
function (validator, next) {
validator(validation.data, function (err, response) {
Expand Down

0 comments on commit 30ce76f

Please sign in to comment.