Skip to content

Commit

Permalink
fix: stalled request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Aug 7, 2024
1 parent 1d0eca4 commit c756be1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utilsApi/cached-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const createCachedProxy = ({
const cacheKey = `${proxyUrl}-${params?.toString() ?? ''}`;

const cachedValue = cache.get(cacheKey);
if (cachedValue) return cachedValue;
if (cachedValue) {
res.json(cachedValue);
return;
}

const url = proxyUrl + (params ? `?${params.toString()}` : '');

Expand Down

0 comments on commit c756be1

Please sign in to comment.