Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent

后端 未结 11 1812
我在风中等你
我在风中等你 2020-12-05 13:27

I am using a Nodejs backend with server-side rendering using handlebars. After reading a doc array of objects from handlebars, which contains key \"content\" an

11条回答
  •  自闭症患者
    2020-12-05 13:57

    If using mongoose, this issue can be solved by using .lean() to get a json object (instead of a mongoose one):

    dbName.find({}).lean()
      // execute query
      .exec(function(error, body) {
         //Some code
      });
    

提交回复
热议问题