Skip to content

Commit

Permalink
edge cases on the web-- who woulda thought!?
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzypants1989 committed Oct 23, 2023
1 parent 896dd57 commit 2e0da52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ajax.js
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 2e0da52

Please sign in to comment.