Commit 62ad605b authored by JC Brand's avatar JC Brand

Bugfix. Attribute error when empty IQ stanza is returned for vCard query

parent 1da55926
# 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');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment