Permalink
Browse files

build v1.0.2

  • Loading branch information...
1 parent c6c66a9 commit 7e36cf6704e7aedf0497b008fe7264fd4f06841e @derickbailey derickbailey committed Dec 6, 2012
View
@@ -1,5 +1,9 @@
# Change log
+### v1.0.2
+
+* Fix for calling `.apply` with IE < 9, when `arguments` is null or undefined
+
### v1.0.1
* Throw an exception if the first argument to `bindTo` is null or undefined
@@ -1,4 +1,4 @@
-// Backbone.EventBinder, v1.0.1
+// Backbone.EventBinder, v1.0.2
// Copyright (c)2012 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
// http://github.com/marionettejs/backbone.eventbinder
@@ -111,7 +111,8 @@
var obj = arguments[0];
var handlers = getHandlerForObject(obj);
- var binding = handlers.bindTo.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ var binding = handlers.bindTo.apply(this, args);
this._eventBindings.push(binding);
@@ -121,7 +122,9 @@
// Unbind from a single binding object. Binding objects are
// returned from the `bindTo` method call.
unbindFrom: function(binding) {
- handlerMap[binding.type].unbindFrom.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ handlerMap[binding.type].unbindFrom.apply(this, args);
+
this._eventBindings = _.reject(this._eventBindings, function(bind){return bind === binding;});
},

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,4 +1,4 @@
-// Backbone.EventBinder, v1.0.1
+// Backbone.EventBinder, v1.0.2
// Copyright (c)2012 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
// http://github.com/marionettejs/backbone.eventbinder
@@ -95,7 +95,8 @@ Backbone.EventBinder = (function(Backbone, _){
var obj = arguments[0];
var handlers = getHandlerForObject(obj);
- var binding = handlers.bindTo.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ var binding = handlers.bindTo.apply(this, args);
this._eventBindings.push(binding);
@@ -105,7 +106,9 @@ Backbone.EventBinder = (function(Backbone, _){
// Unbind from a single binding object. Binding objects are
// returned from the `bindTo` method call.
unbindFrom: function(binding) {
- handlerMap[binding.type].unbindFrom.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ handlerMap[binding.type].unbindFrom.apply(this, args);
+
this._eventBindings = _.reject(this._eventBindings, function(bind){return bind === binding;});
},

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,7 +1,7 @@
{
"name": "Backbone.EventBinder",
"description": "Manage your Backbone event bindings better",
- "version": "1.0.1",
+ "version": "1.0.2",
"homepage": "https://github.com/marionettejs/backbone.eventbinder",
"keywords": [
"backbone",
View
@@ -91,7 +91,8 @@ Backbone.EventBinder = (function(Backbone, _){
var obj = arguments[0];
var handlers = getHandlerForObject(obj);
- var binding = handlers.bindTo.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ var binding = handlers.bindTo.apply(this, args);
this._eventBindings.push(binding);
@@ -101,7 +102,9 @@ Backbone.EventBinder = (function(Backbone, _){
// Unbind from a single binding object. Binding objects are
// returned from the `bindTo` method call.
unbindFrom: function(binding) {
- handlerMap[binding.type].unbindFrom.apply(this,arguments);
+ var args = Array.prototype.slice.apply(arguments);
+ handlerMap[binding.type].unbindFrom.apply(this, args);
+
this._eventBindings = _.reject(this._eventBindings, function(bind){return bind === binding;});
},

0 comments on commit 7e36cf6

Please sign in to comment.