Skip to main content

Bug Tracker

Side navigation

Ticket #2969: jquery.ready-callable.patch
File jquery.ready-callable.patch, 0.4 KB (added by sun, June 02, 2008 04:32PM UTC)

Patch against jQuery 1.2.6

--- jquery.js.orig	2008-06-02 18:03:20.555701400 +0200
+++ jquery.js	2008-06-02 18:31:43.868097100 +0200
@@ -2283,6 +2283,10 @@ jQuery.fn.extend({
 		// Attach the listeners
 		bindReady();
 
+		// Check whether given function is callable.
+		if ( typeof fn != 'function' ) {
+			return false;
+		}
 		// If the DOM is already ready
 		if ( jQuery.isReady )
 			// Execute the function immediately

Download in other formats:

Original Format