aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-19 01:48:05 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-19 01:48:05 +0000
commit3bb82a34de18b8b8e80893571d65080bf5a4702b (patch)
treeb794fd65c3ab5404600480d2d5af44c56644fd0d
parent1d7b7b94ef1c0c10cd5b2a976be40ccacbc49581 (diff)
downloadjquery-3bb82a34de18b8b8e80893571d65080bf5a4702b.tar.gz
jquery-3bb82a34de18b8b8e80893571d65080bf5a4702b.zip
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.
-rw-r--r--src/event.js2
1 files changed, 1 insertions, 1 deletions
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 {