diff --git a/components/auth/LoginView.tsx b/components/auth/LoginView.tsx index 5968e7a50..3c8faef7c 100644 --- a/components/auth/LoginView.tsx +++ b/components/auth/LoginView.tsx @@ -18,6 +18,7 @@ const LoginView: React.FC = () => { const handleLogin = async (e: React.SyntheticEvent) => { e.preventDefault() + if (!dirty && !disabled) { setDirty(true) handleValidation() diff --git a/components/wishlist/WishlistCard/WishlistCard.tsx b/components/wishlist/WishlistCard/WishlistCard.tsx index 6ba274e00..ee1403bf4 100644 --- a/components/wishlist/WishlistCard/WishlistCard.tsx +++ b/components/wishlist/WishlistCard/WishlistCard.tsx @@ -53,7 +53,6 @@ const WishlistCard: FC = ({ item }) => { await addItem({ productId: String(product.id), variantId: String(product.variants[0].id), - sizeId: String(product.variants[0].options[0].id), }) openSidebar() setLoading(false) diff --git a/framework/commerce/api/endpoints/login.ts b/framework/commerce/api/endpoints/login.ts index 3699c8d7f..6f69629b1 100644 --- a/framework/commerce/api/endpoints/login.ts +++ b/framework/commerce/api/endpoints/login.ts @@ -17,6 +17,7 @@ const loginEndpoint: GetAPISchema< ) { return } + try { const body = req.body ?? {} return await handlers['login']({ ...ctx, body })