Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Jan 3, 2025
1 parent b8ed9ff commit 72e7809
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,10 @@ async (...xs: Parameters<F>) => {
}, 5000);

try {
const result = await f(...xs);
clearTimeout(spinnerTimeout);
return result;
return await f(...xs);
} finally {
if (stopSpinning) {
await stopSpinning();
}
clearTimeout(spinnerTimeout);
if (stopSpinning) await stopSpinning();
}
};

Expand Down

0 comments on commit 72e7809

Please sign in to comment.