Don't try to update lines/line numbers until after initial measurement

Fixes #3047
This commit is contained in:
Nathan Sobo
2014-07-24 10:26:13 -07:00
parent cc27f2dbb6
commit d3a46b6bc9
3 changed files with 7 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ GutterComponent = React.createClass
componentDidMount: ->
@appendDummyLineNumber()
@updateLineNumbers() if @props.renderedRowRange?
@updateLineNumbers() if @props.performedInitialMeasurement
# Only update the gutter if the visible row range has changed or if a
# non-zero-delta change to the screen lines has occurred within the current
@@ -59,6 +59,8 @@ GutterComponent = React.createClass
false
componentDidUpdate: (oldProps) ->
return unless @props.performedInitialMeasurement
unless isEqualForProperties(oldProps, @props, 'maxLineNumberDigits')
@updateDummyLineNumber()
@removeLineNumberNodes()