mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05: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
|
@ -156,6 +156,7 @@ class CocoModel extends Backbone.Model
|
|||
@_revertAttributes = $.extend(true, {}, @attributes)
|
||||
|
||||
revert: ->
|
||||
@clear({silent: true})
|
||||
@set(@_revertAttributes, {silent: true}) if @_revertAttributes
|
||||
@clearBackup()
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ module.exports = class SettingsTabView extends CocoView
|
|||
schema = _.cloneDeep Level.schema
|
||||
schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings
|
||||
schema.required = _.intersection schema.required, @editableSettings
|
||||
schema.default = _.pick schema.default, (value, key) => key in @editableSettings
|
||||
thangIDs = @getThangIDs()
|
||||
treemaOptions =
|
||||
filePath: "db/level/#{@level.get('original')}"
|
||||
|
|
Loading…
Reference in a new issue