mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
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:
@@ -76,7 +76,7 @@ class Client extends EventEmitter {
|
||||
page = (await browser.pages())[0];
|
||||
}
|
||||
|
||||
page.setUserAgent(this.options.userAgent);
|
||||
await page.setUserAgent(this.options.userAgent);
|
||||
|
||||
this.pupBrowser = browser;
|
||||
this.pupPage = page;
|
||||
|
||||
Reference in New Issue
Block a user