Monday, 3 April 2017

How to turn off error throwing in ejs?

I have a website with dynamic content. All of the content is passed in through node like res.render('template', data).

I in my template I call <% data.siren %> but it doesn't exist in the dataset, ejs throws an error.

How do I set it so I can continue on with the rendering of the page even though an error is thrown?

Thanks.



via Quesofat

No comments:

Post a Comment