mirror of
https://github.com/wassname/talk.git
synced 2026-07-14 11:18:50 +08:00
Merge branch 'master' into reject-username
This commit is contained in:
@@ -96,7 +96,13 @@ export const logout = () => async (
|
||||
_,
|
||||
{ rest, client, pym, localStorage }
|
||||
) => {
|
||||
await rest('/auth', { method: 'DELETE' });
|
||||
try {
|
||||
await rest('/auth', { method: 'DELETE' });
|
||||
} catch (err) {
|
||||
// We ignore any REST related errors from the delete action, which may/may
|
||||
// not have had a cookie/token attached to it. The logout action was still
|
||||
// called, so we still want to cleanup.
|
||||
}
|
||||
|
||||
// Clear the auth data persisted to localStorage.
|
||||
cleanAuthData(localStorage);
|
||||
|
||||
Reference in New Issue
Block a user