Commit 8b50ebca authored by edwin's avatar edwin

fix rare case on model image having same name with product image

parent f34abf9c
......@@ -104,7 +104,7 @@
}else if(asset.filename.includes(`goods_${SKU}_sub`) ||
asset.filename.includes(`_${SKU}_chip`) ||
(asset.filename.match(new RegExp(`^goods_[0-9]{2}_${SKU}$`)) && asset.models.length === 0) ){
(asset.filename.match(new RegExp(`^goods_[0-9]{2}_${SKU}$`)) && asset.models.length === 0 && asset.products.length === 1) ){
classes = "is-product";
......@@ -272,7 +272,7 @@
if( item.filename.includes(`goods_${SKU}_sub`) ||
item.filename.includes(`_${SKU}_chip`) ||
(item.filename.match(new RegExp(`^goods_[0-9]{2}_${SKU}$`)) && item.models.length === 0)){ // file name include SKU and no model
(item.filename.match(new RegExp(`^goods_[0-9]{2}_${SKU}$`)) && item.models.length === 0 && item.products.length === 1)){ // file name include SKU and no model
arrlist["product"].push(item);
}else if( item.filename.includes(`${SKU}_I0`) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment