File tree Expand file tree Collapse file tree
src/routes/(info)/lttstore/products/[handle] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 <div class =" overflow-x-auto pr-64 edge-fade" >
2121 <div class =" flex w-fit" >
2222 {#each option .values as value }
23- {@const variants = product .variants .filter (v => v .options . includes ( value ) )}
23+ {@const variants = product .variants .filter (v => v .options [ option . position - 1 ] === value )}
2424 {@const variant = variants .find (v => v .featured_media ) ?? variants [0 ]}
2525 {@const inStock = !! variants .find (v => v .available )}
2626 {@const tag = ` #${option .name .toLowerCase ()}_${value .toLowerCase ()} ` }
5555 />
5656 </a >
5757 {:else }
58- {@const otherOptionVariants = product .variants .filter (v => ! v .options . includes ( value ) && v .featured_media )}
58+ {@const otherOptionVariants = product .variants .filter (v => v .options [ option . position - 1 ] !== value && v .featured_media )}
5959 {#if otherOptionVariants .length > 0 }
6060 <div class =" flex justify-center items-center h-full w-full opacity-40 text-xs" >
6161 No Image
You can’t perform that action at this time.
0 commit comments