From 02b4def04a615ebde251bc0670abebd9bad29d64 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Mon, 3 Sep 2018 09:21:12 +1000 Subject: [PATCH] Fix #9 - Variable definition was incorrectly scoped --- src/backend/internal/certificate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/internal/certificate.js b/src/backend/internal/certificate.js index d5028ba1..90d6f11d 100644 --- a/src/backend/internal/certificate.js +++ b/src/backend/internal/certificate.js @@ -409,9 +409,9 @@ const internalCertificate = { * @returns {Promise} */ writeCustomCert: certificate => { - return new Promise((resolve, reject) => { - let dir = '/data/custom_ssl/npm-' + certificate.id; + let dir = '/data/custom_ssl/npm-' + certificate.id; + return new Promise((resolve, reject) => { if (certificate.provider === 'letsencrypt') { reject(new Error('Refusing to write letsencrypt certs here')); return;