fix: await promise when setting user agent (#1113)
Some of my devices were bugging out because the setUserAgent didn't had an await, after this everything was working fine (try loading the wwebjs in a broken microSd ahhaha). We need some testing but on my limited testing everything is working Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
parent
4e6a00dffe
commit
6878598a5d
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class Client extends EventEmitter {
|
||||||
page = (await browser.pages())[0];
|
page = (await browser.pages())[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
page.setUserAgent(this.options.userAgent);
|
await page.setUserAgent(this.options.userAgent);
|
||||||
|
|
||||||
this.pupBrowser = browser;
|
this.pupBrowser = browser;
|
||||||
this.pupPage = page;
|
this.pupPage = page;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue