allow white colors in color grouping cata layout

This commit is contained in:
dank074 2023-01-05 20:07:08 -06:00
parent f6f22b2961
commit 2b7c54e989

View File

@ -79,15 +79,13 @@ export const CatalogLayoutColorGroupingView : FC<CatalogLayoutColorGroupViewProp
page.offers.sort(sortByColorIndex);
let selectedColor = 0;
page.offers.forEach(offer =>
{
if(!offer.product) return;
const furniData = offer.product.furnitureData;
if(((!(furniData)) || (!furniData.hasIndexedColor)))
if(!furniData || !furniData.hasIndexedColor)
{
offers.push(offer);
}
@ -101,11 +99,13 @@ export const CatalogLayoutColorGroupingView : FC<CatalogLayoutColorGroupViewProp
updatedColorableItems.set(name, []);
}
let selectedColor = 0xFFFFFF;
if(furniData.colors)
{
for(let color of furniData.colors)
{
if(color !== 0xFFFFFF) // for some reason we hate the color white
if(color !== 0xFFFFFF) // skip the white colors
{
selectedColor = color;
}