Princeton-CDH/ppa-django

View on GitHub
srcmedia/js/search.js

Summary

Maintainability
A
1 hr
Test Coverage

Function submitForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
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
Severity: Minor
Found in srcmedia/js/search.js - About 1 hr to fix

There are no issues that match your filters.

Category
Status