Skip to content

Commit

Permalink
fix: JS error in the report when assertions don’t have a pointer
Browse files Browse the repository at this point in the history
Closes #54
  • Loading branch information
rdeltour committed Oct 5, 2017
1 parent cec84b1 commit e3b6917
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/report/resources/js/ace-report-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ AceReport.prototype.flattenData = function(data) {
"desc": item["earl:result"]["dct:description"],
"pointer": item["earl:result"]["earl:pointer"],
"impact": item["earl:test"]["earl:impact"],
"location": filename + "#epubcfi(" + item["earl:result"]["earl:pointer"]["cfi"] + ")"
"location": filename,
};
if (item["earl:result"]["earl:pointer"]) {
obj.location += "#epubcfi(" + item["earl:result"]["earl:pointer"]["cfi"] + ")";
}
thiz.flatData.push(obj);

thiz.addIfUnique(obj["file"], thiz.fileFilter);
Expand Down

0 comments on commit e3b6917

Please sign in to comment.