Update std.js

This commit is contained in:
Namhyeon Go 2022-02-25 14:55:06 +09:00 committed by GitHub
parent 07d8a749a2
commit b1808c3fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,7 +313,12 @@ function AsyncFunction(f) {
this.run = function() {
if (this.proxyWindow != null) {
this.proxyWindow.setTimeout(1, this.f);
try {
this.proxyWindow.setTimeout(1, this.f);
} catch (e) {
console.warn("AsyncFunction proxyWindow.setTimeout failed:", e.message);
sleep(1, this.f);
}
} else {
sleep(1, this.f);
}