Remove method not resolving. Try this:
try {
await Snipcart.api.cart.items.remove('{itemUniqueId}');
console.log('deleted');
} catch (error) {
console.log(error)
}
console.log(‘deleted’) will never appear
Remove method not resolving. Try this:
try {
await Snipcart.api.cart.items.remove('{itemUniqueId}');
console.log('deleted');
} catch (error) {
console.log(error)
}
console.log(‘deleted’) will never appear
Hi @AlexZ,
The provided example seems to work fine on my end. Is it possible that the promise fails and you end up in the catch statement? If so, the ‘deleted’ message won’t be logged.
Cheers!