Skip to content

Commit

Permalink
Color swatches work with disparate product IDs (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Aug 10, 2022
1 parent 1791fcc commit c2e7c0b
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions skin/frontend/rwd/default/js/configurableswatches/product-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c2e7c0b

Please sign in to comment.