]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Fix JS error in compose private message page
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 4 Aug 2018 19:14:29 +0000 (21:14 +0200)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 4 Aug 2018 19:14:29 +0000 (21:14 +0200)
view/theme/frio/templates/msg-header.tpl

index 97aa5a64fc9bf96df6ebf19a5a6769078deca502..209010d7ac98d5f00faa6b4f0ab627048429af9f 100644 (file)
@@ -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);
+               }
        });
 </script>