Skip to content

Check if selector is not typeof string _and_ not null before reassigning arg values when on(event-map [, selector][, data]). Fixes #11130#652

Closed
rwaldron wants to merge 2 commits intojquery:masterfrom
rwaldron:11130
Closed

Conversation

@rwaldron
Copy link
Member

@rwaldron rwaldron commented Jan 5, 2012

For review.

See: http://bugs.jquery.com/ticket/11130

Building ./dist/jquery.js
Minifying jQuery ./dist/jquery.min.js
Checking jQuery against JSHint...
JSHint check passed.
jQuery Size - compared to last make
  249648    (+19) jquery.js
   94059     (+9) jquery.min.js
   33388     (+3) jquery.min.js.gz
jQuery build complete.

…ing arg values when on(event-map [, selector][, data]). fixes #11130
src/event.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intended non-strict check here?

don't know if performance matters, but shouldn't it be faster to check for null first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-strict b/c strict === null breaks bind/unbind/one with data behaviour

The non-coerced typeof check is probably faster, but likely not to a statistically significant degree

@dmethvin
Copy link
Member

Landed. c0da49f

@dmethvin dmethvin closed this Jan 13, 2012
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants