Parcourir la source

emoji-views: handle navigator not being instantiated yet

JC Brand il y a 5 ans
Parent
commit
ff799a41f6
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/converse-emoji-views.js

+ 3 - 0
src/converse-emoji-views.js

@@ -331,6 +331,9 @@ converse.plugins.add('converse-emoji-views', {
             },
 
             _onGlobalKeyDown (ev) {
+                if (!this.navigator) {
+                    return;
+                }
                 if (ev.keyCode === converse.keycodes.ENTER &&
                         this.navigator.selected &&
                         u.isVisible(this.el)) {