     @setState hoveredBeatmapId: hoveredBeatmapId
 
   toggleFavorite: =>
-    $.ajax
+    @favoriteXhr = $.ajax
       url: laroute.route('beatmapsets.update-favorite', beatmapset: @props.beatmapset.id)
       method: 'post'
       dataType: 'json'


  componentWillUnmount: ->
    @removeListeners()
    @xhr?.abort()


  removeListeners: ->
    $.unsubscribe '.beatmapsetPage'

      playmode: @state.currentPlaymode

  setCurrentScoreboard: (_e, {scoreboardType = @state.currentScoreboardType, enabledMod = null, forceReload = false, resetMods = false}) =>
    if @scoreboardXhr?
      @scoreboardXhr.abort()

    @setState
      currentScoreboardType: scoreboardType
