Skip to content

Commit

Permalink
Fixed out of memory issue with array concat
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntley committed Jul 27, 2018
1 parent 26d95ca commit 44a5483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/schema/data-tree-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)) {
Expand Down

0 comments on commit 44a5483

Please sign in to comment.