Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 2adfffa

Browse files
committed
Order push fix
1 parent 6e5c7e7 commit 2adfffa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/store/modules/order/mutations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ const mutations: MutationTree<OrderState> = {
1818
order.created_at = new Date()
1919
order.updated_at = new Date()
2020

21-
ordersCollection.setItem(orderId.toString(), order).catch((reason) => {
22-
console.error(reason) // it doesn't work on SSR
23-
}, (err, resp) => {
21+
ordersCollection.setItem(orderId.toString(), order, (err, resp) => {
2422
if (err) console.error(err)
2523
Vue.prototype.$bus.$emit('order/PROCESS_QUEUE', { config: rootStore.state.config }) // process checkout queue
2624
console.info('Order placed, orderId = ' + orderId)
25+
}).catch((reason) => {
26+
console.error(reason) // it doesn't work on SSR
2727
}) // populate cache
2828
}
2929
}

0 commit comments

Comments
 (0)