mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-25 21:43:47 -04:00
Fixed a couple typos with failed resource loading handling.
This commit is contained in:
parent
c01bd69625
commit
a481af08d3
1 changed files with 4 additions and 4 deletions
|
@ -169,9 +169,9 @@ module.exports = class SuperModel extends Backbone.Model
|
|||
_.defer @updateProgress
|
||||
r.clean()
|
||||
|
||||
onResourceFailed: (source) ->
|
||||
onResourceFailed: (r) ->
|
||||
return unless @resources[r.rid]
|
||||
@trigger('failed', source)
|
||||
@trigger('failed', resource: r)
|
||||
r.clean()
|
||||
|
||||
updateProgress: =>
|
||||
|
@ -216,14 +216,14 @@ class Resource extends Backbone.Model
|
|||
|
||||
markFailed: ->
|
||||
return if @isLoaded
|
||||
@trigger('failed', {resource: @})
|
||||
@trigger('failed', @)
|
||||
@isLoaded = @isLoading = false
|
||||
@isFailed = true
|
||||
|
||||
markLoading: ->
|
||||
@isLoaded = @isFailed = false
|
||||
@isLoading = true
|
||||
|
||||
|
||||
clean: ->
|
||||
# request objects get rather large. Clean them up after the request is finished.
|
||||
@jqxhr = null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue