diff --git a/src/dns/namecheap.js b/src/dns/namecheap.js index 55bb77334..3f82788f6 100644 --- a/src/dns/namecheap.js +++ b/src/dns/namecheap.js @@ -70,7 +70,7 @@ async function getZone(domainConfig, zoneName) { throw new BoxError(BoxError.EXTERNAL_ERROR, errorMessage); } - const host = safe.query(tmp, 'CommandResponse[0].DomainDNSGetHostsResult[0].host'); + const host = safe.query(tmp, 'CommandResponse[0].DomainDNSGetHostsResult[0].host', []); if (!host) throw new BoxError(BoxError.EXTERNAL_ERROR, `Invalid response: ${JSON.stringify(tmp)}`); if (!Array.isArray(host)) throw new BoxError(BoxError.EXTERNAL_ERROR, `host is not an array: ${JSON.stringify(tmp)}`);