Skip to content

Commit

Permalink
Update url_handler.js
Browse files Browse the repository at this point in the history
the timeout should always be cleared even if an error occurred within the promise
  • Loading branch information
olafbuitelaar authored Jul 18, 2024
1 parent 9f3dc4d commit 41c68d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fetcher/url_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ async function get(url, options) {
...options,
signal: controller.signal,
credentials: options.withCredentials ? 'include' : 'omit',
})
.finally(()=>{
clearTimeout(timer);
});
clearTimeout(timer);

const error = handleError(response);
if (error) {
Expand Down

0 comments on commit 41c68d2

Please sign in to comment.