From 447ca3a855a18ab19e941d344afeb2a5ce535418 Mon Sep 17 00:00:00 2001 From: Matthias Le Brun Date: Mon, 20 Oct 2014 22:45:41 +0200 Subject: [PATCH] added hasOwnProperty checks --- drivers/bookmarklet/js/driver.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/bookmarklet/js/driver.js b/drivers/bookmarklet/js/driver.js index 1e602a032..65a6f64a7 100644 --- a/drivers/bookmarklet/js/driver.js +++ b/drivers/bookmarklet/js/driver.js @@ -12,6 +12,7 @@ container = d.getElementById('wappalyzer-container'), domain = window.top.location.host, url = window.top.location.href, + hasOwn = Object.prototype.hasOwnProperty, categoryNames = { 1: 'CMS', 2: 'Message Board', @@ -41,7 +42,7 @@ 26: 'Mobile Framework', 27: 'Programming Language', 28: 'Operating System', - 29: 'Search Engine' + 29: 'Search Engine', 30: 'Web Mail', 31: 'CDN', 32: 'Marketing Automation', @@ -139,6 +140,9 @@ if ( w.detected[url] != null && Object.keys(w.detected[url]).length ) { for ( app in w.detected[url] ) { + if(!hasOwn.call(w.detected[url], app)) { + continue; + } html += '
' + '' + @@ -149,6 +153,9 @@ ; for ( i in w.apps[app].cats ) { + if(!hasOwn.call(w.apps[app].cats, i)) { + continue; + } category = w.apps[app].cats[i]; html += '' + categoryNames[category] + '';