better logging of browser fights
This commit is contained in:
parent
4d44661f3b
commit
ffbd428b87
@ -255,12 +255,18 @@ define([
|
|||||||
var op = TextPatcher.diff(shjson, shjson2);
|
var op = TextPatcher.diff(shjson, shjson2);
|
||||||
// log the changes
|
// log the changes
|
||||||
TextPatcher.log(shjson, op);
|
TextPatcher.log(shjson, op);
|
||||||
|
var sop = JSON.stringify(TextPatcher.format(shjson, op));
|
||||||
|
|
||||||
var sop = JSON.stringify(op);
|
var index = module.fights.indexOf(sop);
|
||||||
|
if (index === -1) {
|
||||||
if (module.fights.indexOf(sop) === -1) {
|
|
||||||
module.fights.push(sop);
|
module.fights.push(sop);
|
||||||
console.log("Found a new type of browser disagreement");
|
console.log("Found a new type of browser disagreement");
|
||||||
|
console.log("You can inspect the list in your " +
|
||||||
|
"console at `REALTIME_MODULE.fights`");
|
||||||
|
console.log(module.fights);
|
||||||
|
} else {
|
||||||
|
console.log("Encountered a known browser disagreement: " +
|
||||||
|
"available at `REALTIME_MODULE.fights[%s]`", index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user