mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
Actually remove rejected promises from the pendingList
otherwise this may cause a failure to be "cached" and never removed, resulting in the inability to refresh segments until the page is refreshed
This commit is contained in:
@@ -37,8 +37,12 @@ export async function getSegmentsForVideo(videoID: VideoID, ignoreCache: boolean
|
||||
const pendingData = fetchSegmentsForVideo(videoID);
|
||||
pendingList[videoID] = pendingData;
|
||||
|
||||
const result = await pendingData;
|
||||
delete pendingList[videoID];
|
||||
let result: Awaited<typeof pendingData>;
|
||||
try {
|
||||
result = await pendingData;
|
||||
} finally {
|
||||
delete pendingList[videoID];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user