Skip to content

Commit

Permalink
fix(content): Cannot call 'toString' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Jan 3, 2015
1 parent a98f73d commit d5eb5bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ var validator = require('validator');
// api.purchase // Shared.ops

api.getContent = function(req, res, next) {
var language = req.query.language.toString(); //|| 'en' in i18n
var language = 'en';

if(typeof req.query.language != 'undefined')
language = req.query.language.toString(); //|| 'en' in i18n

var content = _.cloneDeep(shared.content);
var walk = function(obj, lang){
_.each(obj, function(item, key, source){
Expand Down

0 comments on commit d5eb5bb

Please sign in to comment.