From 44a5483b5085ada64bb7d9c587557fbba2be014c Mon Sep 17 00:00:00 2001 From: Chad Huntley Date: Thu, 26 Jul 2018 23:01:31 -0700 Subject: [PATCH] Fixed out of memory issue with array concat --- packages/gatsby/src/schema/data-tree-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/src/schema/data-tree-utils.js b/packages/gatsby/src/schema/data-tree-utils.js index d53a33be41384..fae402fd49c24 100644 --- a/packages/gatsby/src/schema/data-tree-utils.js +++ b/packages/gatsby/src/schema/data-tree-utils.js @@ -163,7 +163,7 @@ const extractFromEntries = ( return getExampleScalarFromArray(values) } else if (_.isObject(exampleValue)) { if (Array.isArray(exampleValue)) { - const concatanedItems = [].concat(...values) + const concatanedItems = _.flatten(values) // Linked node arrays don't get reduced further as we // want to preserve all the linked node types. if (key.includes(`___NODE`)) {