We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents abd8d1e + 9f8b3c1 commit e8bab57Copy full SHA for e8bab57
src/main.ts
@@ -78,17 +78,15 @@ class GithubCorner extends HTMLElement {
78
svgSlot.addEventListener('slotchange', () => {
79
this.#cloneNodes.forEach((n) => {
80
if (this.#svgContainer.contains(n)) {
81
- this.removeChild(n)
+ this.#svgContainer.removeChild(n)
82
}
83
})
84
85
const svgNodes = svgSlot
86
.assignedNodes()
87
.filter((n) => n.nodeName === 'svg')
88
this.#cloneNodes = svgNodes.map((n) => n.cloneNode(true))
89
- this.#cloneNodes.forEach((n) => {
90
- this.#svgContainer.append(n.cloneNode(true))
91
- })
+ this.#cloneNodes.forEach((n) => this.#svgContainer.append(n))
92
93
94
0 commit comments