diff --git a/framework/bigcommerce/api/cart/remove-item.ts b/framework/bigcommerce/api/cart/remove-item.ts index 18c641260..c7ac712d8 100644 --- a/framework/bigcommerce/api/cart/remove-item.ts +++ b/framework/bigcommerce/api/cart/remove-item.ts @@ -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 diff --git a/framework/bigcommerce/api/index.ts b/framework/bigcommerce/api/index.ts index ebfca8890..199868abc 100644 --- a/framework/bigcommerce/api/index.ts +++ b/framework/bigcommerce/api/index.ts @@ -120,7 +120,7 @@ export class CommerceAPI extends CoreCommerceAPI { options?: E['schema']['endpoint']['options'] } ): NextApiHandler { - return this.endpoint(context) + return super.endpoint(context) } }