From 6ae6d8f7e5d45c12acfafc476524703c83e56df0 Mon Sep 17 00:00:00 2001 From: Hazork Date: Sat, 11 Sep 2021 12:55:28 -0300 Subject: [PATCH] style: prettified code --- src/interceptors/response.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/interceptors/response.ts b/src/interceptors/response.ts index ec8cc8b5..b9d559e5 100644 --- a/src/interceptors/response.ts +++ b/src/interceptors/response.ts @@ -1,6 +1,6 @@ import { AxiosCacheInstance } from '../axios/types'; +import { checkPredicateObject } from '../util/cache-predicate'; import { updateCache } from '../util/update-cache'; -import {checkPredicateObject} from '../util/cache-predicate' export function applyResponseInterceptor(axios: AxiosCacheInstance): void { axios.interceptors.response.use(async (response) => { @@ -9,15 +9,16 @@ export function applyResponseInterceptor(axios: AxiosCacheInstance): void { updateCache(axios, response.data, response.config.cache.update); } - const cachePredicate = response.config.cache?.cachePredicate || axios.defaults.cache.cachePredicate; + const cachePredicate = + response.config.cache?.cachePredicate || axios.defaults.cache.cachePredicate; // Config told that this response should be cached. if (typeof cachePredicate === 'function') { - if(!cachePredicate(response)) { + if (!cachePredicate(response)) { return response; } } else { - if(!checkPredicateObject(response, cachePredicate)) { + if (!checkPredicateObject(response, cachePredicate)) { return response; } }