5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:51:43 +00:00

no fallar si no hay cuerpo en la vista previa

This commit is contained in:
f 2020-12-02 10:16:56 -03:00
parent 1fb53168e2
commit cc6efb095b

View file

@ -113,7 +113,7 @@ class Post < OpenStruct
# Notificar a les usuaries que están viendo una previsualización
# XXX: Asume que estamos usando Bootstrap :B
html.at_css('body').first_element_child.before("<div class=\"alert alert-warning text-center\">#{I18n.t('posts.preview.message')}</div>")
html.at_css('body')&.first_element_child&.before("<div class=\"alert alert-warning text-center\">#{I18n.t('posts.preview.message')}</div>")
# Cacofonía
html.to_html.html_safe