refactor: removed return await

This commit is contained in:
arthurfiorette 2022-01-10 13:10:59 -03:00
parent 88d45cc0fb
commit c3661a64e9
No known key found for this signature in database
GPG Key ID: 9D190CD53C53C555

View File

@ -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;