From 46377025a7dd677009fc38fa7f4fd62de113348e Mon Sep 17 00:00:00 2001 From: snesin Date: Thu, 18 Oct 2012 17:10:45 -0500 Subject: [PATCH] Update controller/controller.js The index returned is supposed to be the index of the bind in the array, not the length of the array after the bind. --- controller/controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/controller.js b/controller/controller.js index f3bd8476..22370d9e 100644 --- a/controller/controller.js +++ b/controller/controller.js @@ -798,7 +798,7 @@ steal('jquery/class', 'jquery/lang/string', 'jquery/event/destroyed', function( bindings.push(function( el ) { $(el).unbind("destroyed", destroyCB); }); - return bindings.length; + return bindings.length-1; } if ( typeof el == 'string' ) { func = eventName;