wretch-middlewares
wretch-middlewares copied to clipboard
throttlingCache: TypeError ?(src/throttlingCache/index) error undefined is not an object (evaluating 'x.get(r).forEach')
This has been a recurring error on our site, on latest browser version. Couldn't reproduce myself yet. Reporting here for the record, I will see if I can fix this
return response
})
.catch(error => {
// Reject pending promises on error
inflight.get(_key).forEach(([resolve, reject]) => reject(error)) <--- HERE
inflight.delete(_key)
throw error
})
}