Ticket #9126 (closed bug: fixed)
jquery breaks on use strict
| Reported by: | soenke.sprink@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.6.1 |
| Component: | data | Version: | 1.6 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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'
Change History
comment:1 Changed 2 years ago by timmywil
- Priority changed from undecided to low
- Resolution set to fixed
- Status changed from new to closed
- Component changed from unfiled to data
- Milestone changed from 1.next to 1.6.1
comment:3 Changed 2 years ago by jpage@…
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.
comment:5 Changed 2 years ago by timmywil
The commit that fixed the issue in this ticket was https://github.com/jquery/jquery/commit/c864455ccfad13895d2af6ba287f265ee64bd348 and is present in 1.6.1.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
