Skip to content

Commit 9aa7a30

Browse files
committed
add fallback
1 parent dd1301f commit 9aa7a30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const actions = (store: Store) =>
3434
store.cart.promoCodes = [
3535
...(store.cart.promoCodes || []),
3636
{
37-
id: store.cart.promoCodes.length,
37+
id: (store.cart.promoCodes || []).length,
3838
name,
3939
value: Math.random() > 0.5 ? 10 : 20,
4040
},

0 commit comments

Comments
 (0)