Skip to content

Commit

Permalink
Overwrite the source for all cloned descendants
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Feb 23, 2022
1 parent fa3b57e commit b1eff04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/cloneNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export default function cloneNodes(nodes, source) {

if (source !== undefined) {
cloned.source = source

if ('walk' in cloned) {
cloned.walk((child) => {
child.source = source
})
}
}

return cloned
Expand Down

0 comments on commit b1eff04

Please sign in to comment.