From 3bb82a34de18b8b8e80893571d65080bf5a4702b Mon Sep 17 00:00:00 2001 From: David Serduke Date: Wed, 19 Dec 2007 01:48:05 +0000 Subject: [PATCH] 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. --- src/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.js b/src/event.js index 02ed088c2..c0238ccab 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 { -- 2.39.5