mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-28 06:54:13 -04:00
Fixed a bug where CocoModel wouldn't unset properties on revert because saveBackup is now debounced and would reintroduce those properties.
This commit is contained in:
parent
3b6de071f7
commit
fb06e58201
2 changed files with 2 additions and 0 deletions
app
|
@ -156,6 +156,7 @@ class CocoModel extends Backbone.Model
|
||||||
@_revertAttributes = $.extend(true, {}, @attributes)
|
@_revertAttributes = $.extend(true, {}, @attributes)
|
||||||
|
|
||||||
revert: ->
|
revert: ->
|
||||||
|
@clear({silent: true})
|
||||||
@set(@_revertAttributes, {silent: true}) if @_revertAttributes
|
@set(@_revertAttributes, {silent: true}) if @_revertAttributes
|
||||||
@clearBackup()
|
@clearBackup()
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ module.exports = class SettingsTabView extends CocoView
|
||||||
schema = _.cloneDeep Level.schema
|
schema = _.cloneDeep Level.schema
|
||||||
schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings
|
schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings
|
||||||
schema.required = _.intersection schema.required, @editableSettings
|
schema.required = _.intersection schema.required, @editableSettings
|
||||||
|
schema.default = _.pick schema.default, (value, key) => key in @editableSettings
|
||||||
thangIDs = @getThangIDs()
|
thangIDs = @getThangIDs()
|
||||||
treemaOptions =
|
treemaOptions =
|
||||||
filePath: "db/level/#{@level.get('original')}"
|
filePath: "db/level/#{@level.get('original')}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue