Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #183 from romanseidl/patch-1
Browse files Browse the repository at this point in the history
Fix regression: `did-get-response-details` no longer functional in Electron 3
  • Loading branch information
MrSaints authored Dec 6, 2018
2 parents 77d311a + 179275f commit b201a6d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/src/athenapdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,10 @@ app.on("ready", () => {
}
});

bw.webContents.on("did-get-response-details", (e, status, newURL, originalURL, httpResponseCode, requestMethod, referrer, headers, resourceType) => {
bw.webContents.on("did-navigate", (e, newURL, httpResponseCode, httpResponseText) => {
if (httpResponseCode >= 400) {
console.error(`Failed to load ${newURL} - got HTTP code ${httpResponseCode}`);
if (resourceType === "mainFrame") {
app.exit(1);
}
app.exit(1);
}
});

Expand Down

0 comments on commit b201a6d

Please sign in to comment.