mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Fixed some remaining jqxhr objects hanging around.
This commit is contained in:
parent
a481af08d3
commit
3b87c9c360
1 changed files with 3 additions and 0 deletions
|
@ -32,10 +32,12 @@ class CocoModel extends Backbone.Model
|
||||||
|
|
||||||
onError: ->
|
onError: ->
|
||||||
@loading = false
|
@loading = false
|
||||||
|
@jqxhr = null
|
||||||
|
|
||||||
onLoaded: ->
|
onLoaded: ->
|
||||||
@loaded = true
|
@loaded = true
|
||||||
@loading = false
|
@loading = false
|
||||||
|
@jqxhr = null
|
||||||
@markToRevert()
|
@markToRevert()
|
||||||
@loadFromBackup()
|
@loadFromBackup()
|
||||||
|
|
||||||
|
@ -91,6 +93,7 @@ class CocoModel extends Backbone.Model
|
||||||
@jqxhr
|
@jqxhr
|
||||||
|
|
||||||
markToRevert: ->
|
markToRevert: ->
|
||||||
|
return unless @saveBackups
|
||||||
if @type() is 'ThangType'
|
if @type() is 'ThangType'
|
||||||
@_revertAttributes = _.clone @attributes # No deep clones for these!
|
@_revertAttributes = _.clone @attributes # No deep clones for these!
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue