Skip to content

Commit

Permalink
refactor: remove unnecessary optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaples committed Aug 16, 2024
1 parent 84239d4 commit 5af68a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ui/src/ducks/auth/authSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const login = createAsyncThunk(
);

export const logout = createAsyncThunk('auth/logout', async () => {
return await apiClient.logout().catch(() => {});
return await apiClient.logout().catch(() => { });
});

export const initialize = createAsyncThunk<
Expand Down Expand Up @@ -233,7 +233,7 @@ export const fullyAuthenticatedSelector = createSelector(
}

const authExpired =
authState.user?.AuthSecret?.expires_at &&
authState.user.AuthSecret?.expires_at &&
DateTime.fromISO(authState.user.AuthSecret.expires_at) < DateTime.local();

return !authExpired;
Expand Down

0 comments on commit 5af68a4

Please sign in to comment.