Skip to content

Commit

Permalink
BUGFIX: default to empty object if no cache is instantiated yet
Browse files Browse the repository at this point in the history
  • Loading branch information
johannbm committed Sep 5, 2023
1 parent 860d76f commit f2939b7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/frackend/src/sessionCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ export function setOboTokenForRequest(
return;
}

const cachedValue = sessionCache.get<SessionCacheValue>(hashedAuthHeader);

if (!cachedValue) {
return;
}
const cachedValue =
sessionCache.get<SessionCacheValue>(hashedAuthHeader) ?? {};

cachedValue[scope] = oboToken;

Expand Down

0 comments on commit f2939b7

Please sign in to comment.