Backed out changeset bdec8ddab580 (bug 1418522) for eslint failure at toolkit/content/aboutwebrtc/aboutWebrtc.js:756:37 | Extra space after computed key 'cand.type'. r=backout on a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2017-11-20 20:35:26 +02:00
Родитель b2e912c5ab
Коммит bd79ca1aa9
1 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -665,8 +665,8 @@ ICEStats.prototype = {
let tbody = [];
for (let stat of this.generateICEStats()) {
tbody.push([
stat["local-candidate"] || "",
stat["remote-candidate"] || "",
stat.localcandidate || "",
stat.remotecandidate || "",
stat.state || "",
stat.priority || "",
stat.nominated || "",
@ -733,7 +733,7 @@ ICEStats.prototype = {
if (local) {
stat = {
["local-candidate"]: this.candidateToString(local),
localcandidate: this.candidateToString(local),
state: pair.state,
priority: pair.priority,
nominated: pair.nominated,
@ -744,17 +744,21 @@ ICEStats.prototype = {
matched[local.id] = true;
if (remote) {
stat["remote-candidate"] = this.candidateToString(remote);
stat.remotecandidate = this.candidateToString(remote);
matched[remote.id] = true;
}
stats.push(stat);
}
}
// add the unmatched candidates to the end of the table
[...candidates.values()].filter(cand => !matched[cand.id]).forEach(
cand => stats.push({[cand.type] : this.candidateToString(cand)})
);
for (let c of candidates.values()) {
if (matched[c.id])
continue;
stat = {};
stat[c.type] = this.candidateToString(c);
stats.push(stat);
}
return stats.sort((a, b) => (b.priority || 0) - (a.priority || 0));
},