diff --git a/skin/frontend/rwd/default/js/configurableswatches/product-media.js b/skin/frontend/rwd/default/js/configurableswatches/product-media.js index 0cbb7594d79..a265d4a518a 100644 --- a/skin/frontend/rwd/default/js/configurableswatches/product-media.js +++ b/skin/frontend/rwd/default/js/configurableswatches/product-media.js @@ -22,23 +22,9 @@ var ConfigurableMediaImages = { productImages: {}, imageObjects: {}, + // deprecated - use Array.prototype.intersect instead arrayIntersect: function(a, b) { - var ai=0, bi=0; - var result = new Array(); - - while( ai < a.length && bi < b.length ) - { - if (a[ai] < b[bi] ){ ai++; } - else if (a[ai] > b[bi] ){ bi++; } - else /* they're equal */ - { - result.push(a[ai]); - ai++; - bi++; - } - } - - return result; + return a.intersect(b); }, getCompatibleProductImages: function(productFallback, selectedLabels) {