Skip to content

Commit

Permalink
fix: skip branch if meta does not exist (fixes speedskater/babel-plug…
Browse files Browse the repository at this point in the history
  • Loading branch information
queicherius authored and bcoe committed Oct 17, 2016
1 parent 4147f50 commit 62bae2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/html/annotator.js
Expand Up @@ -130,7 +130,7 @@ function annotateBranches(fileCoverage, structuredText) {
// only highlight if partial branches are missing or if there is a
// single uncovered branch.
if (sumCount > 0 || (sumCount === 0 && branchArray.length === 1)) {
for (i = 0; i < branchArray.length; i += 1) {
for (i = 0; i < branchArray.length && i < metaArray.length; i += 1) {
count = branchArray[i];
meta = metaArray[i];
type = count > 0 ? 'yes' : 'no';
Expand Down

0 comments on commit 62bae2f

Please sign in to comment.