Skip to content

Commit

Permalink
fix: removeChild before appending
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 17, 2021
1 parent 6fb75af commit 1d07ed1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/minimap-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@ class MinimapElement {
const container = parent || this.minimap.getTextEditorElement()
const minimaps = container.querySelectorAll('atom-text-editor-minimap')
if (minimaps.length) {
Array.prototype.forEach.call(minimaps, (el) => { el.destroy() })
Array.prototype.forEach.call(minimaps, (el) => {
el.destroy()
container.removeChild(el)
})
}
container.appendChild(this)
}
Expand Down

0 comments on commit 1d07ed1

Please sign in to comment.