Commit bc4ce285 authored by Kristian Freeman's avatar Kristian Freeman

Fix order packaging

parent ac82ac39
......@@ -82,15 +82,14 @@ const packageOrder = (state, order) => {
newWidgets.shift()
}
const newOrders = [].
concat(state.orders).
slice(state.orders.indexOf(order), 1)
let newOrders = [].concat(state.orders)
newOrders = newOrders.filter((obj, index) => index != state.orders.indexOf(obj))
return Object.assign({}, state, {
error: null,
orders: newOrders,
packaged: state.packaged + 1,
widgets: state.newWidgets
widgets: newWidgets
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment