fix: remove check for null or undefined data on revoke session

This commit is contained in:
Antonella Sgarlatta
2021-06-29 20:30:53 -03:00
parent e7803f797e
commit 0c80e795e4

View File

@@ -76,7 +76,8 @@ function useSessions(
setSessions(sessionsDuringRevoke);
const response = await responsePromise;
if (isNullOrUndefined(response) || isNullOrUndefined(response.data)) {
console.log(response);
if (isNullOrUndefined(response)) {
setSessions(sessionsBeforeRevoke);
} else if ('error' in response) {
if (response.error?.message) {