From 2e0da5213704673e7bd433caa786913c1a212d3f Mon Sep 17 00:00:00 2001 From: Jesse Pence Date: Mon, 23 Oct 2023 04:10:50 -0700 Subject: [PATCH] edge cases on the web-- who woulda thought!? --- ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax.js b/ajax.js index 142e475..6487846 100644 --- a/ajax.js +++ b/ajax.js @@ -1,8 +1,8 @@ export async function wrappedFetch(url, options, type, target) { const { onWait, waitTime, onSuccess, onError, retryDelay = 1000 } = options + let waitTimeout = null onWait && (waitTimeout = setTimeout(() => onWait(), waitTime || 250)) - try { const response = await fetch(url, options) const data = await handleResponse(response, type, target, options)