购物车颜色切换时 换图片的bug修复 code review by xieweiguang
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -119,7 +119,7 @@ function resetColorZeroStock($siblingBlock) { | @@ -119,7 +119,7 @@ function resetColorZeroStock($siblingBlock) { | ||
119 | 119 | ||
120 | // 选择了颜色切换商品图片 | 120 | // 选择了颜色切换商品图片 |
121 | function changeGoodImgWhenClickColor() { | 121 | function changeGoodImgWhenClickColor() { |
122 | - if (hasChooseColor && curColorIndex) { | 122 | + if (hasChooseColor && curColorIndex >= 0) { |
123 | $imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide'); | 123 | $imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide'); |
124 | } | 124 | } |
125 | } | 125 | } |
-
Please register or login to post a comment