diff --git a/src/event.js b/src/event.js index 55ee4ea14..87ae3a65b 100644 --- a/src/event.js +++ b/src/event.js @@ -1002,8 +1002,6 @@ jQuery.fn.extend({ } if ( fn === false ) { fn = returnFalse; - } else if ( !fn ) { - return this; } if ( one === 1 ) { diff --git a/test/unit/event.js b/test/unit/event.js index 3854a2133..dbfb2cd53 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -5,20 +5,6 @@ module( "event", { teardown: moduleTeardown }); -test("null or undefined handler", function() { - expect(2); - // Supports Fixes bug #7229 - try { - jQuery("#firstp").on( "click", null ); - ok(true, "Passing a null handler will not throw an exception"); - } catch ( e ) {} - - try { - jQuery("#firstp").on( "click", undefined ); - ok(true, "Passing an undefined handler will not throw an exception"); - } catch ( e ) {} -}); - test("on() with non-null,defined data", function() { expect(2);