is not isvalid function
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -16,7 +16,7 @@ module.exports = (req, res, next) => { | @@ -16,7 +16,7 @@ module.exports = (req, res, next) => { | ||
16 | 16 | ||
17 | let loginPage = helpers.urlFormat('/passport/login', {refer: req.fullUrl()}); | 17 | let loginPage = helpers.urlFormat('/passport/login', {refer: req.fullUrl()}); |
18 | 18 | ||
19 | - if (_.isEmpty(req.user) || !req.user.uid.isValid()) { | 19 | + if (_.isEmpty(req.user) || !req.user.uid || !req.user.uid.isValid()) { |
20 | if (req.xhr) { | 20 | if (req.xhr) { |
21 | return res.json({ | 21 | return res.json({ |
22 | code: 400, | 22 | code: 400, |
-
Please register or login to post a comment