comparison vcard.js @ 32:b15e1581c3d4

Allow iq error to not have a <text/>.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 23 Dec 2018 20:08:40 +0100
parents e561bdd81777
children 038cab68fa3a
comparison
equal deleted inserted replaced
31:e561bdd81777 32:b15e1581c3d4
40 } 40 }
41 41
42 function onVCard4RetrievalError(iq, string) 42 function onVCard4RetrievalError(iq, string)
43 { 43 {
44 if (!string) { 44 if (!string) {
45 const [condition, text] = parseErrorIq(iq); 45 string = parseErrorIq(iq);
46 const string = condition + ': ' + text;
47 } 46 }
48 string = 'Failed to retrieve vCard4: ' + string; 47 string = 'Failed to retrieve vCard4: ' + string;
49 console.log(string); 48 console.log(string);
50 vcard_fn.disabled = false; 49 vcard_fn.disabled = false;
51 vcard_email.disabled = false; 50 vcard_email.disabled = false;
80 spinnerOk(spinner_img); 79 spinnerOk(spinner_img);
81 } 80 }
82 81
83 function onVCard4ChangeError(iq) 82 function onVCard4ChangeError(iq)
84 { 83 {
85 const [condition, text] = parseErrorIq(iq); 84 const string = parseErrorIq(iq);
86 const string = 'Failed to set vCard4: ' + condition + ': ' + text; 85 const string = 'Failed to set vCard4: ' + string;
87 console.log(string); 86 console.log(string);
88 spinnerError(spinner_img, string); 87 spinnerError(spinner_img, string);
89 } 88 }
90 89
91 vcard_access.addEventListener('change', function (evt) { 90 vcard_access.addEventListener('change', function (evt) {