mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Ignore congrats fetch errors
The congrats page fetches data once a minute, and onRefreshTimer() reloads the page once every 10 minutes. If a data fetch is in flight when the page reload happens, it can cause a 'failed to fetch' error to occur. Closes #2895
This commit is contained in:
parent
d6549623af
commit
db1aecd3d8
1 changed files with 6 additions and 2 deletions
|
@ -26,8 +26,12 @@ export async function setupCongrats(): Promise<CongratsPage> {
|
|||
// refresh automatically if a custom area not provided
|
||||
if (!customMountPoint) {
|
||||
setInterval(async () => {
|
||||
try {
|
||||
const info = await congratsInfo({});
|
||||
page.$set({ info });
|
||||
} catch {
|
||||
console.log("congrats fetch failed");
|
||||
}
|
||||
}, 60000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue