Skip to content

Commit 21635e2

Browse files
farnabazpi0
authored andcommitted
fix(content): remove flatmap to support node v10 (#770)
1 parent ed56f5a commit 21635e2

File tree

1 file changed

+1
-1
lines changed
  • packages/content/parsers/markdown

1 file changed

+1
-1
lines changed

packages/content/parsers/markdown/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Markdown {
3535
}
3636
return [
3737
node,
38-
...node.children.flatMap(child => this.flattenNode(child, maxDepth, depth + 1))
38+
...node.children.reduce((acc, child) => acc.concat(this.flattenNode(child, maxDepth, depth + 1)), [])
3939
]
4040
}
4141

0 commit comments

Comments
 (0)