mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Customizer: Improve IE 8 compatibility.
* Use square bracket notation for `default` keywords. * Use Underscores `indexOf` for arrays. props westonruter, ocean90. fixes #30781 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@30991 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -128,12 +128,12 @@
|
||||
api.utils.areElementListsEqual = function ( listA, listB ) {
|
||||
var equal = (
|
||||
listA.length === listB.length && // if lists are different lengths, then naturally they are not equal
|
||||
-1 === _.map( // are there any false values in the list returned by map?
|
||||
-1 === _.indexOf( _.map( // are there any false values in the list returned by map?
|
||||
_.zip( listA, listB ), // pair up each element between the two lists
|
||||
function ( pair ) {
|
||||
return $( pair[0] ).is( pair[1] ); // compare to see if each pair are equal
|
||||
}
|
||||
).indexOf( false ) // check for presence of false in map's return value
|
||||
), false ) // check for presence of false in map's return value
|
||||
);
|
||||
return equal;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user