aboutsummaryrefslogtreecommitdiff
path: root/node_modules/istanbul-lib-coverage/lib
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/istanbul-lib-coverage/lib')
-rw-r--r--node_modules/istanbul-lib-coverage/lib/file.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/istanbul-lib-coverage/lib/file.js b/node_modules/istanbul-lib-coverage/lib/file.js
index 0cfb8a4be..3cb0ce263 100644
--- a/node_modules/istanbul-lib-coverage/lib/file.js
+++ b/node_modules/istanbul-lib-coverage/lib/file.js
@@ -250,6 +250,10 @@ FileCoverage.prototype.merge = function (other) {
var i,
retArray = that.data.b[k],
secondArray = other.b[k];
+ if (!retArray) {
+ that.data.b[k] = secondArray;
+ return;
+ }
for (i = 0; i < retArray.length; i += 1) {
retArray[i] += secondArray[i];
}