srcmedia/js/search.js
Function submitForm
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function submitForm(state) {
if (!validate()) return // don't submit an invalid form
state = state.filter(field => field.value != '') // filter out empty fields
if (state.filter(field => field.name == 'collections').length == 0) { // if the user manually turned off all collections...
state.push({ name: "collections", value: "" }) // add a blank value to indicate that specific case
- Create a ticketCreate a ticket