We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff2c6d2 commit 7cfc018Copy full SHA for 7cfc018
1 file changed
proxy/user.js
@@ -39,6 +39,9 @@ exports.getUserByLoginName = function (loginName, callback) {
39
* @param {Function} callback 回调函数
40
*/
41
exports.getUserById = function (id, callback) {
42
+ if (!id) {
43
+ return callback();
44
+ }
45
User.findOne({_id: id}, callback);
46
};
47
0 commit comments