Skip to content

Commit

Permalink
extract as variant
Browse files Browse the repository at this point in the history
  • Loading branch information
cctina516 committed Sep 30, 2024
1 parent ee4cf68 commit a6c4cc9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions blocks/commerce-cart-summary/commerce-cart-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ export default async function decorate(block) {

const dropdownOptions = Array.from(
{ length: parseInt(DROPDOWN_MAX_QUANTITY, 10) },
(_, i) => ({
value: `${i + 1}`,
text: `${i + 1}`,
}),
(_, i) => {
const quantityOption = i + 1;
return {
value: `${quantityOption}`,
text: `${quantityOption}`,
};
},
);

block.innerHTML = '';
Expand Down

0 comments on commit a6c4cc9

Please sign in to comment.