summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMax Wu2017-01-21 14:31:41 +0800
committerGitHub2017-01-21 14:31:41 +0800
commit6dfc186691df7b5c63af2ee5eb28cd1e1919050c (patch)
tree58c36e54788224c8ee4ee803a6a3b2c1dbd7b8b2 /lib
parentfc00fa74341a43b2f99b085aa52fee57f40082ff (diff)
parent0e479111e55354434b5100ae165627f5fabe06b5 (diff)
Merge pull request #326 from hackmdio/es6-integration
ES6 integration
Diffstat (limited to '')
-rw-r--r--lib/config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/config.js b/lib/config.js
index f6e7f2c4..3816017e 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -90,11 +90,11 @@ var gitlab = (process.env.HMD_GITLAB_CLIENTID && process.env.HMD_GITLAB_CLIENTSE
var dropbox = (process.env.HMD_DROPBOX_CLIENTID && process.env.HMD_DROPBOX_CLIENTSECRET) ? {
clientID: process.env.HMD_DROPBOX_CLIENTID,
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
-} : config.dropbox || false;
+} : (config.dropbox && config.dropbox.clientID && config.dropbox.clientSecret && config.dropbox) || false;
var google = (process.env.HMD_GOOGLE_CLIENTID && process.env.HMD_GOOGLE_CLIENTSECRET) ? {
clientID: process.env.HMD_GOOGLE_CLIENTID,
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET
-} : config.google || false;
+} : (config.google && config.google.clientID && config.google.clientSecret && config.google) || false;
var ldap = config.ldap || (
process.env.HMD_LDAP_URL ||
process.env.HMD_LDAP_BINDDN ||