mirror of
https://github.com/streamwall/streamwall.git
synced 2026-04-03 20:32:08 -04:00
Fix dupe waitForQuery call
This commit is contained in:
@@ -192,7 +192,7 @@ async function waitForVideo(
|
|||||||
|
|
||||||
let queryPromise: Promise<Element | void> = waitForQuery(kind)
|
let queryPromise: Promise<Element | void> = waitForQuery(kind)
|
||||||
if (timeoutMs !== Infinity) {
|
if (timeoutMs !== Infinity) {
|
||||||
queryPromise = Promise.race([waitForQuery(kind), sleep(timeoutMs)])
|
queryPromise = Promise.race([queryPromise, sleep(timeoutMs)])
|
||||||
}
|
}
|
||||||
let video: Element | null | void = await queryPromise
|
let video: Element | null | void = await queryPromise
|
||||||
if (video instanceof HTMLMediaElement) {
|
if (video instanceof HTMLMediaElement) {
|
||||||
|
|||||||
Reference in New Issue
Block a user