Skip to content

Commit a79df01

Browse files
committed
Prevent errors with undefined prop
1 parent 1ec6118 commit a79df01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bit-docs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ var _ = require("lodash");
33
var tags = require("./tags/tags");
44

55
var mergeOnto = function(prop, dest, source){
6+
if(!dest[prop]) {
7+
dest[prop] = {};
8+
}
69
if(source[prop]) {
7-
dest[prop] = dest[prop].concat(source[prop])
10+
dest[prop] = dest[prop].concat(source[prop]);
811
}
912
};
1013

0 commit comments

Comments
 (0)