change:attribute on unchanged attribute [philosophic] #1664
Closed
Description
var m = new Backbone.Model({mod: 7});
m.on("change:mod", function(model, mod){
console.log("mod changed from " + m.previous("mod") + " to " + mod);
});
m.set("mod", 8, {silent:true});
m.set("mod", 7);
// mod changed from 7 to 7
Is this an expected behaviour?
Wouldn 't be better if no event was triggered for unchanged resulting attributes?
Metadata
Assignees
Labels
No labels