Explorar el Código

Fix: in the case of user is null

Sotaro KARASAWA hace 9 años
padre
commit
68c245ef09
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/util/i18nUserSettingDetector.js

+ 1 - 1
lib/util/i18nUserSettingDetector.js

@@ -4,7 +4,7 @@ module.exports = {
   lookup: function(req, res, options) {
     var language;
 
-    if ('user' in req && typeof req.user !== 'undefined' && req.user !== false) {
+    if (req.user) {
       if ('language' in req.user) {
         language = req.user.language;
       }