aboutsummaryrefslogtreecommitdiff
path: root/node_modules/istanbul-reports/lib
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
commit0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch)
treef9864d4a4148621378958794cbbfdc2393733283 /node_modules/istanbul-reports/lib
parent6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff)
upgrade dependencies
Diffstat (limited to 'node_modules/istanbul-reports/lib')
-rw-r--r--node_modules/istanbul-reports/lib/html/annotator.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/node_modules/istanbul-reports/lib/html/annotator.js b/node_modules/istanbul-reports/lib/html/annotator.js
index 4909f30de..cb1f24e5a 100644
--- a/node_modules/istanbul-reports/lib/html/annotator.js
+++ b/node_modules/istanbul-reports/lib/html/annotator.js
@@ -57,13 +57,12 @@ function annotateStatements(fileCoverage, structuredText) {
if (type === 'no' && structuredText[startLine]) {
if (endLine !== startLine) {
- endLine = startLine;
endCol = structuredText[startLine].text.originalLength();
}
text = structuredText[startLine].text;
text.wrap(startCol,
openSpan,
- startLine === endLine ? endCol : text.originalLength(),
+ startCol < endCol ? endCol : text.originalLength(),
closeSpan);
}
});
@@ -90,13 +89,12 @@ function annotateFunctions(fileCoverage, structuredText) {
if (type === 'no' && structuredText[startLine]) {
if (endLine !== startLine) {
- endLine = startLine;
endCol = structuredText[startLine].text.originalLength();
}
text = structuredText[startLine].text;
text.wrap(startCol,
openSpan,
- startLine === endLine ? endCol : text.originalLength(),
+ startCol < endCol ? endCol : text.originalLength(),
closeSpan);
}
});
@@ -145,7 +143,6 @@ function annotateBranches(fileCoverage, structuredText) {
if (count === 0 && structuredText[startLine]) { //skip branches taken
if (endLine !== startLine) {
- endLine = startLine;
endCol = structuredText[startLine].text.originalLength();
}
text = structuredText[startLine].text;
@@ -159,7 +156,7 @@ function annotateBranches(fileCoverage, structuredText) {
} else {
text.wrap(startCol,
openSpan,
- startLine === endLine ? endCol : text.originalLength(),
+ startCol < endCol ? endCol : text.originalLength(),
closeSpan);
}
}