Skip to content

Commit dd1301f

Browse files
committed
add fallback
1 parent 3ef572c commit dd1301f

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
@@ -32,7 +32,7 @@ export const actions = (store: Store) =>
3232
}),
3333
addPromo: $((name: string) => {
3434
store.cart.promoCodes = [
35-
...store.cart.promoCodes,
35+
...(store.cart.promoCodes || []),
3636
{
3737
id: store.cart.promoCodes.length,
3838
name,

0 commit comments

Comments
 (0)