瀏覽代碼

fix(loggging) fix exceptions on mobile

Maybe due to our DOM wrappers, the Symbol.iterator is not implemented, so
iterate over the IQ fields old-school style.
tags/v0.0.2
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
56857ebe67
共有 1 個檔案被更改,包括 5 行新增3 行删除
  1. 5
    3
      modules/xmpp/strophe.jingle.js

+ 5
- 3
modules/xmpp/strophe.jingle.js 查看文件

212
     const parseCandidates = [];
212
     const parseCandidates = [];
213
 
213
 
214
     // Extract the candidate information from the IQ.
214
     // Extract the candidate information from the IQ.
215
-    for (const candidate of candidates) {
215
+    candidates.each((_, candidate) => {
216
         const attributes = candidate.attributes;
216
         const attributes = candidate.attributes;
217
         const candidateAttrs = [];
217
         const candidateAttrs = [];
218
 
218
 
219
-        for (const attr of attributes) {
219
+        for (let i = 0; i < attributes.length; i++) {
220
+            const attr = attributes[i];
221
+
220
             candidateAttrs.push(`${attr.name}: ${attr.value}`);
222
             candidateAttrs.push(`${attr.name}: ${attr.value}`);
221
         }
223
         }
222
         parseCandidates.push(candidateAttrs.join(' '));
224
         parseCandidates.push(candidateAttrs.join(' '));
223
-    }
225
+    });
224
 
226
 
225
     return parseCandidates;
227
     return parseCandidates;
226
 }
228
 }

Loading…
取消
儲存