瀏覽代碼

bugfix mentioned in #45 don't access a proptery that doesn't exist

v1
AJ ONeal 8 年前
父節點
當前提交
020e355c74
  1. 2
      lib/core.js

2
lib/core.js

@ -350,7 +350,7 @@ function getOrCreateDomainCertificate(args, defaults, handlers) {
}
return fetchFromConfigLiveDir(args).then(function (certs) {
var halfLife = (certs.expiresAt - certs.issuedAt) / 2;
var halfLife = certs && ((certs.expiresAt - certs.issuedAt) / 2);
if (!certs || (Date.now() - certs.issuedAt) > halfLife) {
// There is no cert available

載入中…
取消
儲存