summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/products/ProductView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-02-24 02:06:58 +0100
committerJules Laplace <jules@okfoc.us>2017-02-24 02:06:58 +0100
commitdb9d93526b951a7660925cd2e721ab2588e4ca45 (patch)
treed5d3292c44ecc7ce98c3edb9d7137f8a1ca8d5a8 /StoneIsland/www/js/lib/products/ProductView.js
parent0054cc1463731fc7045016d81dd6342e46c413ea (diff)
change go button to return
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 81ad536d..4d370f9f 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -135,17 +135,23 @@ var ProductView = ScrollableView.extend({
var color = this.colors[default_color_id]
var color_label = color.label
var sizes = this.find_sizes_for_color(default_color_id)
- var size = sizes[0]
- var size_label = this.sizes[size].label
- this.gallery.populate( color.code, details['Item']['ImageTypes'] )
+ if (sizes.length) {
+ var size = sizes[0]
+ var size_label = this.sizes[size].label
- this.color = color
- this.size = size
+ this.gallery.populate( color.code, details['Item']['ImageTypes'] )
- this.is_onesize = !! this.sizes[1]
+ this.color = color
+ this.size = size
+
+ this.is_onesize = !! this.sizes[1]
+
+ this.$size.show().html(size_label)
+ }
+ else {
+ }
- this.$size.show().html(size_label)
if (color_label) {
this.$color.html(color_label)
}