From: David Serduke Date: Wed, 19 Dec 2007 01:48:05 +0000 (+0000) Subject: Second part of the fix for #2071. An empty string "" was being sent to .bind() and... X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=3bb82a34de18b8b8e80893571d65080bf5a4702b;p=jquery.git Second part of the fix for #2071. An empty string "" was being sent to .bind() and when the events were being cleared it went in to an infinite recursive loop till memory was out. The test was !types in the function and changing it to types == undefined fixed the error. --- diff --git a/src/event.js b/src/event.js index 02ed088..c0238cc 100644 --- a/src/event.js +++ b/src/event.js @@ -102,7 +102,7 @@ jQuery.event = { if ( events ) { // Unbind all events for the element - if ( !types ) + if ( types == undefined ) for ( var type in events ) this.remove( elem, type ); else {