Skip to content

Commit

Permalink
fix(block-tools): remove references to implicit globals document an…
Browse files Browse the repository at this point in the history
…d `Text` (#7532)
  • Loading branch information
silvertech-daniel committed Sep 30, 2024
1 parent bdfd8df commit 306a671
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ export default (html: string, doc: Document): Document => {
for (let i = mappedElements.snapshotLength - 1; i >= 0; i--) {
const mappedElm = mappedElements.snapshotItem(i) as HTMLElement
const tags = elementMap[mappedElm.className]
const text = new Text(mappedElm.textContent || '')
const text = doc.createTextNode(mappedElm.textContent || '')
if (!tags) {
continue
}

const parentElement = document.createElement(tags[0])
const parentElement = doc.createElement(tags[0])
let parent = parentElement
let child = parentElement
tags.slice(1).forEach((tag) => {
child = document.createElement(tag)
child = doc.createElement(tag)
parent.appendChild(child)
parent = child
})
Expand Down

0 comments on commit 306a671

Please sign in to comment.