Skip to content

Rename catch variable to avoid masking variable with the same name in the enclosing scope #602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2012

Conversation

jasvir
Copy link
Contributor

@jasvir jasvir commented Feb 24, 2012

datepicker reuses a variable declared in an enclosing function as a catch block variable. Some browsers (specifically IE8) does not create a new scope for the catch block and as a result linters like JSLint and Caja complain about this reuse. In this case, the variable name is not a good name for the exception either.

This change renames the "event" catch variable to "err" to avoid the problem.

…ariable in scope. Fixed #8138 - datepicker: IE8 does not create a new scope for catch blocks and will cause
@scottgonzalez scottgonzalez merged commit 367da95 into jquery:master Feb 25, 2012
@scottgonzalez
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants