From 48fd9488d0a52727b82248ae038e6dd8cbe38cd0 Mon Sep 17 00:00:00 2001 From: tkostuch Date: Thu, 28 May 2020 12:31:54 +0200 Subject: [PATCH 1/2] hide best sellers if those not exist --- pages/PageNotFound.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/PageNotFound.vue b/pages/PageNotFound.vue index e16ad49..d875250 100644 --- a/pages/PageNotFound.vue +++ b/pages/PageNotFound.vue @@ -31,7 +31,7 @@ {{ $t('to find product you were looking for.') }}

-
+

{{ $t('See our bestsellers') }} From 0ea673f215e902f8c9aadb07546d9da5b5d8474c Mon Sep 17 00:00:00 2001 From: tkostuch Date: Thu, 28 May 2020 13:18:20 +0200 Subject: [PATCH 2/2] convert option id to string in gallery --- components/core/ProductGalleryCarousel.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/core/ProductGalleryCarousel.vue b/components/core/ProductGalleryCarousel.vue index 32bc715..a5d661d 100644 --- a/components/core/ProductGalleryCarousel.vue +++ b/components/core/ProductGalleryCarousel.vue @@ -103,6 +103,7 @@ export default { }, methods: { navigate (index) { + if (index < 0) return this.currentPage = index }, async selectVariant (configuration) { @@ -115,7 +116,7 @@ export default { if (option) { let index = this.gallery.findIndex( obj => obj.id && Object.entries(obj.id).toString() === Object.entries(option).toString(), option) - if (index < 0) index = this.gallery.findIndex(obj => obj.id && obj.id.color === option.color) + if (index < 0) index = this.gallery.findIndex(obj => String(obj.id && obj.id.color) === String(option.color)) this.navigate(index) } }