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) {
    console.log(PrismicDom.RichText.asHtml(response.results[0].data["standaloneestimator-email-notifications"]['test2']))
  }, 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...

PrismicDom.RichText.asHtml(response.results[0].data.testtitle)

Let me know if this makes sense,
Thanks.

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.