Permalink
Browse files

Merge pull request #93 from andris-silis/master

fixed bug in Backbone.Model.change() override; wrong `arguments` due to anonymous closure.
  • Loading branch information...
PaulUithol committed Mar 25, 2012
2 parents 337a97b + a90f7cd commit 810e5cb4cf1a3c31a3ec6f0cc20de4322374428c
Showing with 2 additions and 2 deletions.
  1. +2 −2 backbone-relational.js
View
@@ -1148,9 +1148,9 @@
* and 'previousAttributes' will be available when the event is fired.
*/
change: function( options ) {
- var dit = this;
+ var dit = this, args = arguments;
Backbone.Relational.eventQueue.add( function() {
- Backbone.Model.prototype.change.apply( dit, arguments );
+ Backbone.Model.prototype.change.apply( dit, args );
});
},

0 comments on commit 810e5cb

Please sign in to comment.