From bef569619fc4f3062bd6a0b73719e63ab2ca4a11 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Thu, 1 Apr 2021 18:37:12 -0600 Subject: [PATCH] bug fixes --- framework/bigcommerce/api/cart/remove-item.ts | 2 +- framework/bigcommerce/api/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) } }