Skip to content

Commit

Permalink
Handle entity.roles being undefined in rdap
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Feb 8, 2021
1 parent cfc71af commit 7b9e9ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-whois",
"version": "0.0.2",
"version": "0.0.3",
"description": "Perform RDAP/WHOIS lookups over HTTP",
"main": "src/index.js",
"keywords": [],
Expand Down
2 changes: 1 addition & 1 deletion src/rdap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { uniqueCommaSep, consistentResultObj, consistentResult } = require('./uti

// Find RDAP data entities that match a name
const findEntities = (name, data) => data.entities && data.entities.filter(entity =>
entity.roles.map(role => role.trim().toLowerCase()).includes(name));
entity.roles && entity.roles.map(role => role.trim().toLowerCase()).includes(name));

// Find a specific vcard for an RDAP entity
const entityVcard = (entity, vcard) => {
Expand Down

0 comments on commit 7b9e9ba

Please sign in to comment.