File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ const AtlasProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) =
99
99
let timeoutId : ReturnType < typeof setTimeout > ;
100
100
101
101
const verifyAndSchedule = ( ) => {
102
- // initial verfiy check
102
+ // initial verify check
103
103
const isValid = verifySession ( ) ;
104
104
setIsVerified ( isValid ) ;
105
105
@@ -156,13 +156,13 @@ const AtlasProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) =
156
156
return ! isUndefined ( user . email ) ;
157
157
} , [ user ] ) ;
158
158
159
- async function fetchWithAuthErrorHandling < T > ( request : ( ) => Promise < T > ) : Promise < T > {
159
+ function fetchWithAuthErrorHandling < T > ( request : ( ) => Promise < T > ) : Promise < T > {
160
160
try {
161
- return await request ( ) ;
161
+ return request ( ) ;
162
162
} catch ( error ) {
163
163
if (
164
164
error instanceof AuthorizationError ||
165
- ( error instanceof GraphQLError && error ?. extensions [ "code" ] === "UNAUTHENTICATED" )
165
+ ( error instanceof GraphQLError && error ?. extensions ?. [ "code" ] === "UNAUTHENTICATED" )
166
166
) {
167
167
setIsVerified ( false ) ;
168
168
}
You can’t perform that action at this time.
0 commit comments