Browse Source

domain add: Try fallback if the list of name servers is empty (#111)

master
Olli Vanhoja 9 years ago
committed by Guillermo Rauch
parent
commit
749cd8ac1f
  1. 2
      lib/index.js

2
lib/index.js

@ -354,7 +354,7 @@ export default class Now extends EventEmitter {
if (this._debug) console.timeEnd(`> [debug] #${attempt} GET /whois-ns${fallback ? '-fallback' : ''}`);
const body = await res.json();
if (200 === res.status) {
if (!body.nameservers && !fallback) {
if ((!body.nameservers || body.nameservers.length === 0) && !fallback) {
// if the nameservers are `null` it's likely
// that our whois service failed to parse it
return this.getNameservers(domain, { fallback: true });

Loading…
Cancel
Save