Explorar o código

Bugfix. Handle attrs not being defined

JC Brand %!s(int64=7) %!d(string=hai) anos
pai
achega
c219d37083
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/converse-chatboxes.js

+ 1 - 1
src/converse-chatboxes.js

@@ -498,7 +498,7 @@
                         }
 
                         if (_.isString(jids)) {
-                            if (!attrs.fullname) {
+                            if (attrs && !_.get(attrs, 'fullname')) {
                                 attrs.fullname = _.get(_converse.api.contacts.get(jids), 'attributes.fullname');
                             }
                             const chatbox = _converse.chatboxes.getChatBox(jids, attrs, true);