Browse Source

emoji-views: handle navigator not being instantiated yet

JC Brand 5 years ago
parent
commit
ff799a41f6
1 changed files with 3 additions and 0 deletions
  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)) {