After async.map processes the data, it uses render to render in the callback function, and the page reports an error. The not found, console did not report an error.

router.get ("/ list",async (ctx) = > {

)
ctx.state = {
    title:""
};
await menusModel.order("id").select().then((result)=>{
    async.map(result,(item,callback)=>{
        menusModel.find({id:item.pid},"title").then((res)=>{
            if(item.pid != 0){
                item.parent=res.title;
            }else{
                item.parent="";
            }
            callback(null, item);
        })
    },(err,rows)=>{
        ctx.render("admin/menu/list.html",{list:rows});
    });
})

})
callback is also called, and the rows in the callback function can also be printed, and the execution stops after one line of ctx.render, and the page cannot be rendered

.
Mar.31,2021
Menu