Explorar el Código

Handle case where there aren't bookmarks

JC Brand hace 8 años
padre
commit
8d2788c543
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/converse-bookmarks.js

+ 3 - 0
src/converse-bookmarks.js

@@ -77,6 +77,9 @@
                      * for this room, and if so use it.
                      * Otherwise delegate to the super method.
                      */
+                    if (_.isUndefined(converse.bookmarks)) {
+                        return;
+                    }
                     var model = converse.bookmarks.findWhere({'jid': this.model.get('jid')});
                     if (!_.isUndefined(model) && model.get('nick')) {
                         this.join(this.model.get('nick'));