Fix dupe waitForQuery call

This commit is contained in:
Max Goodhart
2026-02-01 23:54:28 -08:00
parent 77352deb97
commit 19d23062ee

View File

@@ -192,7 +192,7 @@ async function waitForVideo(
let queryPromise: Promise<Element | void> = waitForQuery(kind)
if (timeoutMs !== Infinity) {
queryPromise = Promise.race([waitForQuery(kind), sleep(timeoutMs)])
queryPromise = Promise.race([queryPromise, sleep(timeoutMs)])
}
let video: Element | null | void = await queryPromise
if (video instanceof HTMLMediaElement) {