fix
This commit is contained in:
parent
a537334fba
commit
3481fed915
@ -211,7 +211,10 @@ class Main extends Component {
|
|||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
cart: [...this.state.cart, {"name": "Doprava na " + point.name, "id": 2, "price": delivery_cost, "locked": true, "quantity": 1}],
|
cart: [
|
||||||
|
...this.state.cart.filter(product => !product.name.startsWith("Doprava na ")),
|
||||||
|
{"name": "Doprava na " + point.name, "id": 2, "price": delivery_cost, "locked": true, "quantity": 1}
|
||||||
|
],
|
||||||
delivery: point.name,
|
delivery: point.name,
|
||||||
status_text: json.reason,
|
status_text: json.reason,
|
||||||
status: "success",
|
status: "success",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user