From c3661a64e957e4f0e8df721ab23bdea703d2247a Mon Sep 17 00:00:00 2001 From: arthurfiorette Date: Mon, 10 Jan 2022 13:10:59 -0300 Subject: [PATCH] refactor: removed `return await` --- src/util/cache-predicate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/cache-predicate.ts b/src/util/cache-predicate.ts index 7c6152a..1fc5758 100644 --- a/src/util/cache-predicate.ts +++ b/src/util/cache-predicate.ts @@ -5,9 +5,9 @@ import type { CachePredicate } from './types'; export async function testCachePredicate( response: CacheAxiosResponse, predicate: CachePredicate -) { +): Promise { if (typeof predicate === 'function') { - return await predicate(response); + return predicate(response); } const { statusCheck, responseMatch, containsHeaders } = predicate;