allow transferCart to fail on login/register
This commit is contained in:
@@ -272,7 +272,12 @@ export async function medusaLoginOrRegister(credentials: {
|
|||||||
password,
|
password,
|
||||||
});
|
});
|
||||||
await setAuthToken(token as string);
|
await setAuthToken(token as string);
|
||||||
await transferCart();
|
|
||||||
|
try {
|
||||||
|
await transferCart();
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed to transfer cart", e);
|
||||||
|
}
|
||||||
|
|
||||||
const customerCacheTag = await getCacheTag("customers");
|
const customerCacheTag = await getCacheTag("customers");
|
||||||
revalidateTag(customerCacheTag);
|
revalidateTag(customerCacheTag);
|
||||||
|
|||||||
Reference in New Issue
Block a user