Properly extract promo string
This commit is contained in:
parent
3827fd238c
commit
5aa51fa8ca
1 changed files with 2 additions and 1 deletions
|
|
@ -133,8 +133,9 @@ export default {
|
|||
// assemble data for payload
|
||||
// // reduce promocode array
|
||||
const promos = order.lineItems.promos ?? [];
|
||||
const promoCodes = promos.map((promo) => promo.promoCode);
|
||||
const promoString =
|
||||
promos.length === 0 ? "" : promos.reduce((prev, next) => `${prev},${next}`);
|
||||
promoCodes.length === 0 ? "" : promoCodes.reduce((prev, next) => `${prev},${next}`);
|
||||
|
||||
// // reduce glass array
|
||||
const glassToReplace = order.damage.glassToReplace ?? [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue