diff --git a/src/gutter-component.coffee b/src/gutter-component.coffee index 5dff8609d..822d43393 100644 --- a/src/gutter-component.coffee +++ b/src/gutter-component.coffee @@ -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