mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 14:33:17 +00:00
eslint: add strict await checking: (#684)
- require await / void / catch for promises - don't allow unnecessary await
This commit is contained in:
parent
9cacae6bb6
commit
b42548373d
16 changed files with 79 additions and 46 deletions
|
@ -437,7 +437,7 @@ class InteractiveBrowser {
|
|||
|
||||
// attempt to keep everything to initial tab if headless
|
||||
if (this.params.headless) {
|
||||
cdp.send("Page.enable");
|
||||
cdp.send("Page.enable").catch((e) => logger.warn("Page.enable error", e));
|
||||
|
||||
cdp.on("Page.windowOpen", async (resp) => {
|
||||
if (!resp.url) {
|
||||
|
@ -493,7 +493,9 @@ class InteractiveBrowser {
|
|||
|
||||
handlePageLoad() {
|
||||
this.addOrigin();
|
||||
this.saveCookiesFor(this.page.url());
|
||||
this.saveCookiesFor(this.page.url()).catch((e) =>
|
||||
logger.warn("Error saving cookies", e),
|
||||
);
|
||||
}
|
||||
|
||||
async saveAllCookies() {
|
||||
|
@ -722,4 +724,4 @@ class InteractiveBrowser {
|
|||
}
|
||||
}
|
||||
|
||||
main();
|
||||
await main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue