TypeError: e.reduce is not a function error

I get this error when I run Richtext.asHtml on a Richtext object. Here's my code:

return client.query(Prismic.Predicates.at('document.type', 'standaloneestimator-email-notifications')) 
  .then(function(response) {
  }, function(err) {
    console.log("Something went wrong: ", err);

Hi Mitchel,

This error occurs when you pass anything other than a Rich Text field to the asHtml helper function. Looking at your code you are passing the entire top level of the document to this function.

Say for instance you named your Rich Text field testtitle then you would need to hit exactly that, so...


Let me know if this makes sense,

I got it working this morning. I needed to add .value to the end of the code I passed to the asHtml helper function

I'm glad you got it working.