Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

convert option id to string in gallery #12

Merged
merged 2 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/core/ProductGalleryCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default {
},
methods: {
navigate (index) {
if (index < 0) return
this.currentPage = index
},
async selectVariant (configuration) {
Expand All @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pages/PageNotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ $t('to find product you were looking for.') }}
</p>
</div>
<section class="container">
<section class="container" v-if="ourBestsellersCollection.length">
<header class="col-md-12 pt40">
<h3 class="align-center">
{{ $t('See our bestsellers') }}
Expand Down