Javascript errors caused by  elements being wrapped inside a  tag
I found out that the checkbox 'Trim this field to a maximum number of characters' was checked in one of my views which was trimming some HTML from the field content (closing tags) and causing the issue.

checking the option 'Field can contain HTML' fixed the issue for me.