mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Don't clear elements owned by other components from line nodes map
We should really be recycling elements when they move between lines, but that's a bigger project.
This commit is contained in:
committed by
Antonio Scandurra
parent
19db16664f
commit
b8a3e2f163
@@ -984,8 +984,11 @@ class LineComponent {
|
||||
update () {}
|
||||
|
||||
destroy () {
|
||||
this.props.lineNodesByScreenLineId.delete(this.props.screenLine.id)
|
||||
this.props.textNodesByScreenLineId.delete(this.props.screenLine.id)
|
||||
const {lineNodesByScreenLineId, textNodesByScreenLineId, screenLine} = this.props
|
||||
if (lineNodesByScreenLineId.get(screenLine.id) === this.element) {
|
||||
lineNodesByScreenLineId.delete(screenLine.id)
|
||||
textNodesByScreenLineId.delete(screenLine.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user