@cleandns/whois-rdap 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -217,7 +217,9 @@ function findStatus(statuses, domain) {
217
217
  ? statuses
218
218
  : statuses && typeof statuses === "object"
219
219
  ? Object.keys(statuses)
220
- : (statuses || "").trim().split(/\s*,\s*/)).map((status) => normalizeWhoisStatus(status));
220
+ : typeof statuses === "string"
221
+ ? statuses.trim().split(/\s*,\s*/)
222
+ : []).map((status) => normalizeWhoisStatus(status));
221
223
  }
222
224
  function findNameservers(values) {
223
225
  let nameservers = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleandns/whois-rdap",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -335,7 +335,9 @@ function findStatus(statuses: string | string[], domain: string): string[] {
335
335
  ? statuses
336
336
  : statuses && typeof statuses === "object"
337
337
  ? Object.keys(statuses)
338
- : (statuses || "").trim().split(/\s*,\s*/)
338
+ : typeof statuses === "string"
339
+ ? statuses.trim().split(/\s*,\s*/)
340
+ : []
339
341
  ).map((status) => normalizeWhoisStatus(status));
340
342
  }
341
343