bug fixes

This commit is contained in:
Luis Alvarez 2021-04-01 18:37:12 -06:00
parent 519008bad0
commit bef569619f
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ const removeItem: CartEndpoint['operations']['removeItem'] = async ({
: // Remove the cart cookie if the cart was removed (empty items)
getCartCookie(config.cartCookie)
)
res.status(200).json({ data: normalizeCart(data) })
res.status(200).json({ data: data && normalizeCart(data) })
}
export default removeItem

View File

@ -120,7 +120,7 @@ export class CommerceAPI extends CoreCommerceAPI<Provider> {
options?: E['schema']['endpoint']['options']
}
): NextApiHandler {
return this.endpoint(context)
return super.endpoint(context)
}
}