Skip to content

Commit 1d07ed1

Browse files
committed
fix: removeChild before appending
1 parent 6fb75af commit 1d07ed1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/minimap-element.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,10 @@ class MinimapElement {
427427
const container = parent || this.minimap.getTextEditorElement()
428428
const minimaps = container.querySelectorAll('atom-text-editor-minimap')
429429
if (minimaps.length) {
430-
Array.prototype.forEach.call(minimaps, (el) => { el.destroy() })
430+
Array.prototype.forEach.call(minimaps, (el) => {
431+
el.destroy()
432+
container.removeChild(el)
433+
})
431434
}
432435
container.appendChild(this)
433436
}

0 commit comments

Comments
 (0)