Make WordPress Core

Ticket #30781: 30781.diff

File 30781.diff, 934 bytes (added by westonruter, 10 years ago)

Use _.indexOf() instead of Array.prototype.indexOf()

  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index 880e583..f43630a 100644
     
    128128        api.utils.areElementListsEqual = function ( listA, listB ) {
    129129                var equal = (
    130130                        listA.length === listB.length && // if lists are different lengths, then naturally they are not equal
    131                         -1 === _.map( // are there any false values in the list returned by map?
     131                        -1 === _.indexOf( _.map( // are there any false values in the list returned by map?
    132132                                _.zip( listA, listB ), // pair up each element between the two lists
    133133                                function ( pair ) {
    134134                                        return $( pair[0] ).is( pair[1] ); // compare to see if each pair are equal
    135135                                }
    136                         ).indexOf( false ) // check for presence of false in map's return value
     136                        ), false ) // check for presence of false in map's return value
    137137                );
    138138                return equal;
    139139        };