We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70f7e37 commit c3b57e5Copy full SHA for c3b57e5
src/core/request/index.ts
@@ -1,3 +1,4 @@
1
+/* eslint-disable max-lines-per-function */
2
/*!
3
* V4Fire Core
4
* https://github.com/V4Fire/Core
@@ -250,7 +251,7 @@ function request<D = unknown>(
250
251
fromCache = false;
252
253
if (cacheKey != null && ctx.canCache) {
- if (ctx.pendingCache.has(cacheKey)) {
254
+ if (await ctx.pendingCache.has(cacheKey)) {
255
try {
256
const
257
res = await ctx.pendingCache.get(cacheKey);
@@ -277,7 +278,7 @@ function request<D = unknown>(
277
278
})));
279
}
280
- fromCache = await AbortablePromise.resolve(ctx.cache.has(cacheKey), requestPromise);
281
+ fromCache = await AbortablePromise.resolve(await ctx.cache.has(cacheKey), requestPromise);
282
283
284
let
0 commit comments