From: Hypolite Petovan Date: Sat, 4 Aug 2018 19:14:29 +0000 (+0200) Subject: [frio] Fix JS error in compose private message page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ea09a51dff0685b250ff12e282e578f55a3dac52;p=friendica.git [frio] Fix JS error in compose private message page --- diff --git a/view/theme/frio/templates/msg-header.tpl b/view/theme/frio/templates/msg-header.tpl index 97aa5a64fc..209010d7ac 100644 --- a/view/theme/frio/templates/msg-header.tpl +++ b/view/theme/frio/templates/msg-header.tpl @@ -7,6 +7,9 @@ $('#mail-conversation').perfectScrollbar(); $('#message-preview').perfectScrollbar(); // Scroll to the bottom of the mail conversation. - $('#mail-conversation').scrollTop($('#mail-conversation')[0].scrollHeight); + var $el = $('#mail-conversation'); + if ($el.length) { + $el.scrollTop($el.get(0).scrollHeight); + } });