Skip to content

Commit

Permalink
fix: remove check for null or undefined data on revoke session
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed Jun 29, 2021
1 parent e7803f7 commit 0c80e79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/components/SessionsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0c80e79

Please sign in to comment.