The issue here was configSchema is an attribute within attributes and so revertAttributes and attributes get the same instance of it when clone is used. Later calls to _.equals fail when only configSchema has changed.
This commit is contained in:
dpen2000 2014-03-22 01:32:45 +00:00
parent b91f3200c2
commit 60ca991c58

View file

@ -86,7 +86,7 @@ class CocoModel extends Backbone.Model
res
markToRevert: ->
@_revertAttributes = _.clone @attributes
@_revertAttributes = _.cloneDeep @attributes
revert: ->
@set(@_revertAttributes, {silent: true}) if @_revertAttributes