Defensive on the decorations

This commit is contained in:
Ben Ogle
2014-06-05 18:12:36 -07:00
parent 5cd8f5952f
commit da5bf6c74c

View File

@@ -162,9 +162,10 @@ GutterComponent = React.createClass
for decoration in previousDecorations
node.classList.remove(decoration.class) if not contains(decorations, decoration)
for decoration in decorations
if not contains(previousDecorations, decoration) and (not softWrapped or softWrapped and decoration.softWrap)
node.classList.add(decoration.class)
if decorations?
for decoration in decorations
if not contains(previousDecorations, decoration) and (not softWrapped or softWrapped and decoration.softWrap)
node.classList.add(decoration.class)
unless @screenRowsByLineNumberId[lineNumberId] is screenRow
{lineHeightInPixels} = @props