Skip to content

Commit

Permalink
fix: remove unnecessary destructuring of previous cookie jar
Browse files Browse the repository at this point in the history
  • Loading branch information
poftadeh committed Nov 20, 2019
1 parent d746851 commit 209c9fe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Browser/Browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,12 @@ class Browser {
*/
private handleNavigationError(error, config) {
if (error.statusCode === 401) {
const { cookieJar: existingCookieJar } = this.dom;

this.dom = new JSDOM(' ', {
resources: config.resourceLoader,
runScripts: config.runScripts,
beforeParse: config.beforeParse,
pretendToBeVisual: true,
cookieJar: existingCookieJar || config.jar,
cookieJar: config.jar,
});
} else {
throw error;
Expand Down

0 comments on commit 209c9fe

Please sign in to comment.