Add an assertion when line is null in presenter

Refs #5527
This commit is contained in:
Nathan Sobo
2015-02-12 13:23:42 -07:00
parent 19a524dd50
commit e739444800

View File

@@ -166,6 +166,9 @@ class TextEditorPresenter
row = @startRow
while row < @endRow
line = @model.tokenizedLineForScreenRow(row)
unless line?
throw new Error("No line exists for row #{row}. Last screen row: #{@model.getLastScreenRow()}")
visibleLineIds[line.id] = true
if @state.content.lines.hasOwnProperty(line.id)
@updateLineState(row, line)