Skip to content

Commit

Permalink
fix(content): remove flatmap to support node v10 (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored and pi0 committed Mar 1, 2021
1 parent ed56f5a commit 21635e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/content/parsers/markdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Markdown {
}
return [
node,
...node.children.flatMap(child => this.flattenNode(child, maxDepth, depth + 1))
...node.children.reduce((acc, child) => acc.concat(this.flattenNode(child, maxDepth, depth + 1)), [])
]
}

Expand Down

0 comments on commit 21635e2

Please sign in to comment.