mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Sure wish I could test this bug without a full production deploy.
This commit is contained in:
parent
49f3a0a298
commit
6539adf53d
1 changed files with 2 additions and 4 deletions
|
@ -65,8 +65,7 @@ class CocoModel extends Backbone.Model
|
||||||
set: (attributes, options) ->
|
set: (attributes, options) ->
|
||||||
delete @attributesWithDefaults unless attributes is 'thangs' # unless attributes is 'thangs': performance optimization for Levels keeping their cache.
|
delete @attributesWithDefaults unless attributes is 'thangs' # unless attributes is 'thangs': performance optimization for Levels keeping their cache.
|
||||||
inFlux = @loading or not @loaded
|
inFlux = @loading or not @loaded
|
||||||
console.log @type(), @get('name'), 'setting', attributes, options
|
console.error @type(), @get('name'), 'setting', attributes, options
|
||||||
console.trace
|
|
||||||
@markToRevert() unless inFlux or @_revertAttributes or @project or options?.fromMerge
|
@markToRevert() unless inFlux or @_revertAttributes or @project or options?.fromMerge
|
||||||
res = super attributes, options
|
res = super attributes, options
|
||||||
@saveBackup() if @saveBackups and (not inFlux)
|
@saveBackup() if @saveBackups and (not inFlux)
|
||||||
|
@ -81,8 +80,7 @@ class CocoModel extends Backbone.Model
|
||||||
TreemaNode.utils.populateDefaults(clone, @schema(), thisTV4)
|
TreemaNode.utils.populateDefaults(clone, @schema(), thisTV4)
|
||||||
@attributesWithDefaults = clone
|
@attributesWithDefaults = clone
|
||||||
duration = new Date() - t0
|
duration = new Date() - t0
|
||||||
console.debug "Populated defaults for #{@type()}#{if @attributes.name then ' ' + @attributes.name else ''} in #{duration}ms"# if duration > 10
|
console.debug "Populated defaults for #{@type()}#{if @attributes.name then ' ' + @attributes.name else ''} in #{duration}ms" if duration > 10
|
||||||
console.trace?()
|
|
||||||
|
|
||||||
loadFromBackup: ->
|
loadFromBackup: ->
|
||||||
return unless @saveBackups
|
return unless @saveBackups
|
||||||
|
|
Loading…
Reference in a new issue