2
0
mirror of https://github.com/therootcompany/greenlock.js.git synced 2025-03-05 16:20:44 +00:00

fix #52 handle error / empty cert in approveDomains callback

This commit is contained in:
AJ ONeal 2016-08-30 08:21:42 -06:00
parent efabe049ab
commit 2248110ab1

View File

@ -208,13 +208,15 @@ LE.create = function (le) {
var opts = { domain: domain, domains: certs && certs.altnames || [ domain ] };
le.approveDomains(opts, certs, function (_err, results) {
log(le.debug, 'le.approveDomains called with certs for', results.certs && results.certs.altnames || 'NONE', 'and options:');
log(le.debug, results.options);
if (_err) {
log(le.debug, 'le.approveDomains called with error', _err);
cb(_err);
return;
}
log(le.debug, 'le.approveDomains called with certs for', results.certs && results.certs.altnames || 'NONE', 'and options:');
log(le.debug, results.options);
var promise;
if (results.certs) {