   constructor: (props) ->
     super props
 
-    @url = location.href
-
     prevState = JSON.parse(props.container.dataset.reactState ? '{}')
 
-    @state = prevState.state if prevState.url == location.href
+    @state = prevState.state unless _.isEmpty(prevState)
     @state ?= _.extend
       beatmaps: @props.beatmaps
       paging:

      @setState newState


  recordUrl: =>
    @url = location.href


  saveState: =>
    @props.container.dataset.reactState = JSON.stringify({@state, @url})
    @componentWillUnmount()



    $(document).on 'beatmap:load_more.beatmaps', @loadMore
    $(document).on 'beatmap:search:start.beatmaps', @search
    $(document).on 'beatmap:search:filtered.beatmaps', @updateFilters
    $(document).on 'turbolinks:before-cache.beatmaps', @saveState
    $(window).on 'resize.beatmaps', @updateColumnCount

