Closed nclsmitchell closed 7 years ago
Hello,
When trying to remove an item from my current cart, I get the error: Invalid JSON: Unexpected token u in JSON at position 8
Invalid JSON: Unexpected token u in JSON at position 8
I am using the following code with import { gateway as MoltinGateway } from 'moltin' :
import { gateway as MoltinGateway } from 'moltin'
removeFromCart(id) { const Moltin = MoltinGateway({ client_id: 'MY_CLIENT_ID' }) Moltin.Cart.RemoveItem(id).then((cart) => { this.props.dispatch(updateCart(cart)) }) }
It seems that a payload is send that shouldn't be here: {"data":undefined}
{"data":undefined}
Do you know why this payload is send?
Thank you in advance!
@nclsmitchell Which version of the library are you using? I believe this should of been fixed in 2.2.2.
2.2.2
Ok I had the 2.1.0 version, it is now working.
Thank you!
@nclsmitchell npm install @moltin/sdk
npm install @moltin/sdk
Hello,
When trying to remove an item from my current cart, I get the error:
Invalid JSON: Unexpected token u in JSON at position 8
I am using the following code with
import { gateway as MoltinGateway } from 'moltin'
:It seems that a payload is send that shouldn't be here:
{"data":undefined}
Do you know why this payload is send?
Thank you in advance!