mirror of
https://github.com/atom/atom.git
synced 2026-02-03 19:25:06 -05:00
Explicitly guard against decorating destroyed markers
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
c02d7995ce
commit
b01e97be59
@@ -812,6 +812,7 @@ class DisplayBuffer extends Model
|
||||
decorationsState
|
||||
|
||||
decorateMarker: (marker, decorationParams) ->
|
||||
throw new Error("Cannot decorate a destroyed marker") if marker.isDestroyed()
|
||||
marker = @getMarkerLayer(marker.layer.id).getMarker(marker.id)
|
||||
decoration = new Decoration(marker, this, decorationParams)
|
||||
@decorationsByMarkerId[marker.id] ?= []
|
||||
|
||||
Reference in New Issue
Block a user