diff --git a/helpers/strategies/AxiosStrategy.js b/helpers/strategies/AxiosStrategy.js index c170fc73..415bebb1 100644 --- a/helpers/strategies/AxiosStrategy.js +++ b/helpers/strategies/AxiosStrategy.js @@ -46,7 +46,7 @@ const axiosWithoutProxy = async (req, _store) => { try { const res = await axios({ ...req, - cancelToken: cancelSource.token, + cancelToken: (cancelSource && cancelSource.token) || "", responseType: "arraybuffer", }) @@ -67,4 +67,8 @@ const axiosStrategy = (req, store) => { return axiosWithoutProxy(req, store) } +export const testables = { + cancelSource, +} + export default axiosStrategy