From 8c3392f058029d28c637fa07e8e1fc2af23b902c Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Sat, 4 Feb 2017 16:01:45 -0500 Subject: [PATCH] Remove uses of lodash/compact (#5181) --- packages/babel-types/src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/babel-types/src/index.js b/packages/babel-types/src/index.js index 54edc7d981..fc633e1474 100644 --- a/packages/babel-types/src/index.js +++ b/packages/babel-types/src/index.js @@ -1,5 +1,4 @@ import toFastProperties from "to-fast-properties"; -import compact from "lodash/compact"; import loClone from "lodash/clone"; import uniq from "lodash/uniq"; @@ -398,7 +397,10 @@ export function inheritInnerComments(child: Object, parent: Object) { function _inheritComments(key, child, parent) { if (child && parent) { - child[key] = uniq(compact([].concat(child[key], parent[key]))); + child[key] = uniq( + [].concat(child[key], parent[key]) + .filter(Boolean) + ); } }