From e096a925b4d01d9849b9e889f6a2ddef01bea61a Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Mon, 28 Aug 2017 17:40:26 +0300 Subject: [PATCH] Reject if response property is null Else you will face an Error Can not access property of null --- src/drivers/npm/driver.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index ef7569b17..485790281 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -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();