Bugfix. Attribute error when empty IQ stanza is returned for vCard query
This commit is contained in:
parent
1da5592607
commit
62ad605bec
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 3.3.3 (Unreleased)
|
||||
|
||||
- Attribute error when empty IQ stanza is returned for vCard query
|
||||
|
||||
## 3.3.2 (2018-01-29)
|
||||
|
||||
### Bugfixes
|
||||
|
|
|
@ -14,8 +14,12 @@
|
|||
|
||||
|
||||
function onVCardData (_converse, jid, iq, callback) {
|
||||
const vcard = iq.querySelector('vCard'),
|
||||
img_type = _.get(vcard.querySelector('TYPE'), 'textContent'),
|
||||
const vcard = iq.querySelector('vCard');
|
||||
if (_.isNull(vcard)) {
|
||||
// Some servers return an empty IQ
|
||||
return onVCardError(_converse, jid, iq, callback);
|
||||
}
|
||||
const img_type = _.get(vcard.querySelector('TYPE'), 'textContent'),
|
||||
img = _.get(vcard.querySelector('BINVAL'), 'textContent'),
|
||||
url = _.get(vcard.querySelector('URL'), 'textContent'),
|
||||
fullname = _.get(vcard.querySelector('FN'), 'textContent');
|
||||
|
|
Loading…
Reference in New Issue
Block a user