Reject if response property is null

Else you will face an Error Can not access property of null
main
Vaidas Lungis 7 years ago committed by GitHub
parent cd4b8b1224
commit e096a925b4

@ -61,6 +61,10 @@ const driver = {
browser.visit(url, error => {
wappalyzer.driver.document = browser.document;
if (!browser.resources['0'].response){
return reject('Response null '+url);
}
const headers = browser.resources['0'].response.headers;
const vars = Object.getOwnPropertyNames(browser.window);
const html = browser.html();