Skip to content

Commit

Permalink
testing looping
Browse files Browse the repository at this point in the history
  • Loading branch information
katiegoines committed Jun 10, 2024
1 parent 5b279cb commit 9eb7484
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/scripts/validate-redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module.exports = {
}
};

// let redirects = redirectsImport;
const errors = [];
const validate = ajv.compile(schema);

Expand All @@ -46,15 +45,11 @@ module.exports = {
const loc = error.schemaPath.slice(error.schemaPath.indexOf('properties') + 11, -8);
const errorMessage = '\n\n' + 'INVALID ENTRY: Please correct the error in the "' + loc +'" property of the following entry: \n' + invalidEntry + '\n\n' + 'ERROR MESSAGE: ' + error.message;
errors.push(errorMessage);

// console.log(errorMessage)

// redirects = redirects.splice(parseInt(error.instancePath.slice(1, -7)) + 1);

validateEntries(redirects.splice(parseInt(error.instancePath.slice(1, -7)) + 1));

} else if (valid && errors.length > 0) {
console.log('done')
console.log('logging', errors)
return errors;
}
}
Expand Down

0 comments on commit 9eb7484

Please sign in to comment.