Skip to content

Commit

Permalink
fix: date parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dylandepass committed Nov 5, 2024
1 parent d986afa commit cebc0bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/queries/cs-variants.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export const adapter = (config, variants) => variants.map(({ selections, product
const today = new Date();
const specialPriceToDate = new Date(specialToDate);
if (specialPriceToDate.getTime() >= today.getTime()) {
variant.specialToDate = specialToDate.substring(0, specialToDate.indexOf(' '));
const [date] = specialToDate.split(' ');
variant.specialToDate = date;
}
}

Expand Down

0 comments on commit cebc0bc

Please sign in to comment.