changeset 6262:2c8c1a604154

js: fix crash when the user isn't logged in and there thus isn't any text area (Issue #250)
author domruf <dominikruf@gmail.com>
date Sat, 22 Oct 2016 19:47:16 +0200
parents 9f4c9fc67481
children 358f9a456a43
files kallithea/public/js/base.js
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/base.js	Sun Sep 18 20:00:46 2016 +0200
+++ b/kallithea/public/js/base.js	Sat Oct 22 19:47:16 2016 +0200
@@ -749,7 +749,9 @@
     });
 
     tooltip_activate();
-    MentionsAutoComplete($textarea, $mentions_container, _USERS_AC_DATA);
+    if ($textarea.length > 0) {
+        MentionsAutoComplete($textarea, $mentions_container, _USERS_AC_DATA);
+    }
     if (f_path) {
         $textarea.focus();
     }