diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index 930d88ff..a2744d0c 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -54,15 +54,17 @@ const actions: ActionTree = { }, updateUnidentifiedItem({ commit, state }, payload: any) { const parsed = state.purchaseOrders.parsed as any; + let original = state.purchaseOrders.original as any; const unidentifiedItems = payload.unidentifiedItems.map((item: any) => { if(item.updatedSku) { item.shopifyProductSKU = item.updatedSku; parsed[item.orderId].push(item); + original[item.orderId].push(item) } else { return item; } }).filter((item: any) => item); - const original = JSON.parse(JSON.stringify(state.purchaseOrders.parsed)); + original = JSON.parse(JSON.stringify(state.purchaseOrders.original)); commit(types.ORDER_PURCHASEORDERS_UPDATED, { parsed, original, unidentifiedItems}); }