diff options
Diffstat (limited to 'routes/index.js')
-rw-r--r-- | routes/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/index.js b/routes/index.js index 8b31ad5..1ab2ba3 100644 --- a/routes/index.js +++ b/routes/index.js @@ -11,8 +11,9 @@ router.get('/', function (req, res, next) { flags.push('NO_FEATURE_DETECT') } - const flagsStr = `var FLAGS = [${flags.map(flag => `"${flag}"`).toString(', ')}];` - res.render('index', { flagsStr, users: users.users }) + const flagsStr = `var FLAGS = ${JSON.stringify(flags)};` + const usersStr = `var USERS = ${JSON.stringify(users.users)};` + res.render('index', { flagsStr, usersStr }) }) module.exports = router |