Fix for too many technologies detected

main
Elbert Alias 3 years ago
parent eefb2a328d
commit f2b1a4c15d

@ -67,11 +67,16 @@ function getJs(page, technologies = Wappalyzer.technologies) {
const value = chain
.split('.')
.reduce(
(value, method) => (value ? value[method] : undefined),
(value, method) =>
value &&
value instanceof Object &&
Object.prototype.hasOwnProperty.call(value, method)
? value[method]
: '__UNDEFINED__',
window
)
if (typeof value !== 'undefined') {
if (value !== '__UNDEFINED__') {
technologies.push({
name,
chain,

@ -14,7 +14,7 @@
postMessage({
wappalyzer: {
js: technologies.reduce((technologies, { name, chains }) => {
chains.forEach((chain) => {
chains.forEach((chain, index) => {
const value = chain
.split('.')
.reduce(
@ -23,11 +23,11 @@
value instanceof Object &&
Object.prototype.hasOwnProperty.call(value, method)
? value[method]
: undefined,
: '__UNDEFINED__',
window
)
if (value !== undefined) {
if (value !== '__UNDEFINED__') {
technologies.push({
name,
chain,

@ -27947,4 +27947,4 @@
"website": "https://www.xt-commerce.com"
}
}
}
}