mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
refactor: removed return await
This commit is contained in:
parent
88d45cc0fb
commit
c3661a64e9
@ -5,9 +5,9 @@ import type { CachePredicate } from './types';
|
||||
export async function testCachePredicate<R = unknown, D = unknown>(
|
||||
response: CacheAxiosResponse<R, D>,
|
||||
predicate: CachePredicate<R, D>
|
||||
) {
|
||||
): Promise<boolean> {
|
||||
if (typeof predicate === 'function') {
|
||||
return await predicate(response);
|
||||
return predicate(response);
|
||||
}
|
||||
|
||||
const { statusCheck, responseMatch, containsHeaders } = predicate;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user