Skip to content

Commit

Permalink
fix problem vuestorefront#2709, when variant not found we're searchin…
Browse files Browse the repository at this point in the history
…g for image with specific color
  • Loading branch information
patzick committed May 28, 2019
1 parent cc4ce10 commit 2a900fd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ export default {
return result
}, {})
if (option) {
const index = this.gallery.findIndex(
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)
this.navigate(index)
}
}
Expand Down

0 comments on commit 2a900fd

Please sign in to comment.