Skip to content

Commit

Permalink
fix(gatsby-transformer-remark): pass current textNode into recursive …
Browse files Browse the repository at this point in the history
…call to maintain reference (#19546)
  • Loading branch information
stephencweiss authored and GatsbyJS Bot committed Nov 15, 2019
1 parent 4c80f78 commit c05b6d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-transformer-remark/src/hast-processing.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function findLastTextNode(node, textNode) {
}
if (node.children) {
node.children.forEach(child => {
const laterTextNode = findLastTextNode(child)
const laterTextNode = findLastTextNode(child, textNode)
if (laterTextNode !== textNode) {
textNode = laterTextNode
}
Expand Down

0 comments on commit c05b6d8

Please sign in to comment.