fix(quoted-html): Fix null reference error, resolves Sentry 3264

This commit is contained in:
Ben Gotow 2015-10-09 14:12:27 -07:00
parent 9107bc325e
commit a84787859c

View file

@ -184,7 +184,7 @@ class QuotedHTMLParser
if weirdEl then elements.push(weirdEl)
elements = _.map elements, (el) ->
if el.previousElementSibling.nodeName is "HR"
if el.previousElementSibling and el.previousElementSibling.nodeName is "HR"
return el.parentElement
else return el
return elements