Side navigation
#9126 closed bug (fixed)
Opened May 05, 2011 03:55PM UTC
Closed May 06, 2011 06:57PM UTC
Last modified June 21, 2011 06:46PM UTC
jquery breaks on use strict
Reported by: | soenke.sprink@tagesspiegel.de | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.6.1 |
Component: | data | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
in strict it throws an error on line 1948 "name is not defined"
And it here is the code:
name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
And yes, name is introduced without 'var'
Attachments (0)
Change History (5)
Changed May 06, 2011 06:57PM UTC by comment:1
component: | unfiled → data |
---|---|
milestone: | 1.next → 1.6.1 |
priority: | undecided → low |
resolution: | → fixed |
status: | new → closed |
Changed June 21, 2011 06:39PM UTC by comment:3
There are other places in the 1.6.1 code where a global "name" variable is changed still; the window's name is still being overwritten. For example, on line 1607, you have the line:
name = attr[i].name;
And on 1610:
name = jQuery.camelCase( name.substring(5) );
I suggest this is reopened.
Changed June 21, 2011 06:42PM UTC by comment:4
Never mind... saw the declaration on line 1605.
Changed June 21, 2011 06:46PM UTC by comment:5
The commit that fixed the issue in this ticket was https://github.com/jquery/jquery/commit/c864455ccfad13895d2af6ba287f265ee64bd348 and is present in 1.6.1.