       @setState
         isLoading: true
         loadingText: 'Fetching'
-      @props.fetchPrevious(=>
+      @props.fetchPrevious( =>
         @setState
           isLoading: false
           loadingText: ''

    @refs.lines.scrollTo(0)

  scrollToBottom: ->
    @refs.lines.scrollTo(@state.linesToRender.length)

module.exports = Contents

  componentDidMount: ->
    @scrollNode = ReactDOM.findDOMNode(@refs.scrollContainer)
    @currentOffset = parseInt @props.offset
    if @props.taskState not in Utils.TERMINAL_TASK_STATES
      @startTailingPoll()

  componentDidUpdate: (prevProps, prevState) ->
    if @tailingPoll
