Skip to content

Commit 22f4d97

Browse files
committed
chore: add optional chaining to app auth
1 parent def8c64 commit 22f4d97

File tree

1 file changed

+2
-2
lines changed
  • packages/backend/src/helpers/http-client

1 file changed

+2
-2
lines changed

packages/backend/src/helpers/http-client/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export default function createHttpClient({
8888

8989
if (
9090
(status === 401 || status === 403) &&
91-
$.app.auth.refreshToken &&
92-
!$.app.auth.isRefreshTokenRequested
91+
$.app?.auth?.refreshToken &&
92+
!$.app?.auth?.isRefreshTokenRequested
9393
) {
9494
$.app.auth.isRefreshTokenRequested = true
9595
await $.app.auth.refreshToken($)

0 commit comments

Comments
 (0)