mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
fix(thumbnail): [PKG-TOOL-THUMB-07] preserve falsy cleanup exceptions
This commit is contained in:
1 parent
2a38067911
commit
1c522f181b
18 files changed
+5822
-20
No files matched your search
@@ -115,14 +115,18 @@ function revoke(urls, url) {
|
||||
}
|
||||
function cleanupAll(callbacks) {
|
||||
let failure;
|
||||
let failed = false;
|
||||
for (const callback of callbacks) {
|
||||
try {
|
||||
callback();
|
||||
} catch (error) {
|
||||
failure || (failure = error);
|
||||
if (!failed) {
|
||||
failed = true;
|
||||
failure = error;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (failure)
|
||||
if (failed)
|
||||
throw failure;
|
||||
}
|
||||
function closeState(tool, reason = "destroyed") {
|
||||
|
||||
Reference in new issue
Block a user