fix: harden favorite state consistency
This commit is contained in:
@@ -251,7 +251,9 @@ const toggleFavorite = async (): Promise<void> => {
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof ApiError && error.status === 401) {
|
||||
await signInThenReturn();
|
||||
if (version === favoriteRequestVersion && product.value?.id === current.id) {
|
||||
await signInThenReturn();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (version === favoriteRequestVersion && product.value?.id === current.id) {
|
||||
|
||||
Reference in New Issue
Block a user