Skip to content

Commit c6a50ce

Browse files
committed
fix(app-config): Use parentheses to fix string concat in config
Changes: - wrap `process.env.DOMAIN || ''` in parentheses to correct the order of the OR operator and string concat Closes #466
1 parent 44267bf commit c6a50ce

File tree

1 file changed

+4
-4
lines changed
  • app/templates/server/config/environment

1 file changed

+4
-4
lines changed

app/templates/server/config/environment/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,24 @@ var all = {
4444
facebook: {
4545
clientID: process.env.FACEBOOK_ID || 'id',
4646
clientSecret: process.env.FACEBOOK_SECRET || 'secret',
47-
callbackURL: process.env.DOMAIN || '' + '/auth/facebook/callback'
47+
callbackURL: (process.env.DOMAIN || '') + '/auth/facebook/callback'
4848
},
4949
<% } if(filters.twitterAuth) { %>
5050
twitter: {
5151
consumerKey: process.env.TWITTER_ID || 'id',
5252
consumerSecret: process.env.TWITTER_SECRET || 'secret',
53-
callbackURL: process.env.DOMAIN || '' + '/auth/twitter/callback'
53+
callbackURL: (process.env.DOMAIN || '') + '/auth/twitter/callback'
5454
},
5555
<% } if(filters.googleAuth) { %>
5656
google: {
5757
clientID: process.env.GOOGLE_ID || 'id',
5858
clientSecret: process.env.GOOGLE_SECRET || 'secret',
59-
callbackURL: process.env.DOMAIN || '' + '/auth/google/callback'
59+
callbackURL: (process.env.DOMAIN || '') + '/auth/google/callback'
6060
}<% } %>
6161
};
6262

6363
// Export the config object based on the NODE_ENV
6464
// ==============================================
6565
module.exports = _.merge(
6666
all,
67-
require('./' + process.env.NODE_ENV + '.js') || {});
67+
require('./' + process.env.NODE_ENV + '.js') || {});

0 commit comments

Comments
 (0)