Fixed some remaining jqxhr objects hanging around.

This commit is contained in:
Scott Erickson 2014-05-27 16:33:57 -07:00
parent a481af08d3
commit 3b87c9c360

View file

@ -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