add existence check for child and parent when inheriting comments
This commit is contained in:
parent
06a58f228c
commit
de42a6f796
@ -267,9 +267,11 @@ export function removeComments(child: Object): Object {
|
||||
*/
|
||||
|
||||
export function inheritsComments(child: Object, parent: Object): Object {
|
||||
each(COMMENT_KEYS, function (key) {
|
||||
child[key] = uniq(compact([].concat(child[key], parent[key])));
|
||||
});
|
||||
if (child && parent) {
|
||||
each(COMMENT_KEYS, function (key) {
|
||||
child[key] = uniq(compact([].concat(child[key], parent[key])));
|
||||
});
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user