Skip to content

Commit

Permalink
Fix response to wait
Browse files Browse the repository at this point in the history
  • Loading branch information
yamitzky committed Feb 5, 2022
1 parent 13581af commit 9d605d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export class Browser {
page.setViewportSize({ width: 1024, height: 360 })
await page.goto(url, { timeout: config.browserTimeout })
try {
await page.waitForResponse(/events/, { timeout: config.browserTimeout })
const waitFor = url.includes('/query/') ? /results/ : /events/
await page.waitForResponse(waitFor, { timeout: config.browserTimeout })
} catch {
console.error()
}
Expand Down

0 comments on commit 9d605d5

Please sign in to comment.