express框架中调用render()出现栈溢出问题
**//控制台报错信息**
**RangeError: Maximum call stack size exceeded**
    at Buffer.get [Symbol.toStringTag] (<anonymous>)
    at Buffer.toString (<anonymous>)
    at toType (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:7:47)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:20:16)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)
    at extend (C:\Users\piCzhang\Desktop\project_blog\node_modules\art-template\lib\compile\adapter\extend.js:31:33)

**//问题描述**
只有在使用populate进行多表联查才会出现这个问题，但是把主表里面的_id字段过滤掉就不会出现这个问题

**//异常代码段**
```javascript
 const Article = require('../../model/article');
const dateFormat = require('dateformat');
const Comment = require('../../model/comment');
module.exports = async (req,res)=>{
   let article = await Article.findOne({_id:req.query.id});
   let comments = await Comment.find({aId:req.query.id}).populate('uid').lean();
  
   
  
    console.log({comments})
    res.render('home/article',{"article":article, "comments":{comments}}); //这里出错
 
}
```

**//使用的模型Article**
```javascript 
 const mongoose = require('mongoose');
const commentSchema = new mongoose.Schema({
 uid:{
        type:mongoose.Schema.Types.ObjectId,
        ref:'User',
        required:true
    },
    date:{
        type:Date,
        default:Date.now(),
        required:true
     },
    aId:{
        type:mongoose.Schema.Types.ObjectId,
        ref:'Article',
        required:true
    },
    content:String
});
const Comment = mongoose.model('comment',commentSchema);
module.exports = Comment;
```

**//联查使用的模型User**
 ```javascript 
 const mongoose = require('mongoose');
const Joi = require('joi');

const userSchema = new mongoose.Schema({
    username: {
        type: String,
        required: true,
        minlength: 2,
        maxlength: 20
    },
    email: {
        type: String,
        unique: true,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    role: {
        type: String,
        required: true

    },
    //0表示不启用，1表示启用
    state: {
        type: Number,
        default: 0
    }



});
const User = mongoose.model('User', userSchema);

const validateUser = (user) => {
    const schema = Joi.object({
        username: Joi.string()
            .alphanum()
            .min(3)
            .max(30)
            .required().error(new Error('用户名不符合规范')),

        password: Joi.string()
            .pattern(new RegExp('^[a-zA-Z0-9]{3,30}$')).error(new Error('密码不符合规范')),
        role: Joi.string()
            .pattern(new RegExp('(^admin$|^normal$)')).error(new Error('角色不符合规范'))
        ,
        state: Joi.string()
            .pattern(new RegExp('0|1')).error(new Error('状态不符合规范')),

        email: Joi.string()
            .email({ minDomainSegments: 2, tlds: { allow: ['com', 'net'] } }).error(new Error('邮箱不符合规范'))
    });
    return schema.validate(user);
}


module.exports = {
    User,
    validateUser
}
```

