Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: forward timeout waitForFileChooser #8856

Merged
merged 1 commit into from Aug 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/util/DeferredPromise.ts
Expand Up @@ -31,10 +31,13 @@ export function createDeferredPromiseWithTimer<T>(
resolver = resolve;
rejector = reject;
});
const timeoutId = setTimeout(() => {
isRejected = true;
rejector(new TimeoutError(timeoutMessage));
}, timeout);
const timeoutId =
timeout > 0
jrandolf marked this conversation as resolved.
Show resolved Hide resolved
? setTimeout(() => {
isRejected = true;
rejector(new TimeoutError(timeoutMessage));
}, timeout)
: undefined;
return Object.assign(taskPromise, {
resolved: () => {
return isResolved;
Expand Down