Skip to content

Commit

Permalink
Merge pull request #79 from HTTPArchive/find
Browse files Browse the repository at this point in the history
Merge fix for array.find from wptagent
  • Loading branch information
pmeenan authored Dec 3, 2024
2 parents ed2167b + 06d4d5c commit 27e8236
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/js/wappalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,15 @@ const Wappalyzer = {
.flat(),
].find(({ name: _name }) => name === _name),

getCategory: (id) => Wappalyzer.categories.find(({ id: _id }) => id === _id),

getCategory: (id) => {
for (const category of Wappalyzer.categories) {
if (category.id == id) {
return category;
}
}
return null;
},

/**
* Resolve promises for implied technology.
* @param {Array} detections
Expand Down

0 comments on commit 27e8236

Please sign in to comment.