Event: Fix chaining .on() with null handlers

Fixes gh-2846
This commit is contained in:
Devin Wilson
2016-01-13 21:06:43 -07:00
committed by Timmy Willison
parent 780cac802b
commit 17f0e26ad9
2 changed files with 24 additions and 0 deletions

View File

@@ -70,6 +70,8 @@ function on( elem, types, selector, data, fn, one ) {
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return elem;
}
if ( one === 1 ) {