Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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:
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'

Change History (5)

comment:1 Changed 12 years ago by Timmy Willison

Component: unfileddata
Milestone: 1.next1.6.1
Priority: undecidedlow
Resolution: fixed
Status: newclosed

comment:2 Changed 12 years ago by Timmy Willison

#9241 is a duplicate of this ticket.

comment:3 Changed 12 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:4 Changed 12 years ago by anonymous

Never mind... saw the declaration on line 1605.

comment:5 Changed 12 years ago by Timmy Willison

The commit that fixed the issue in this ticket was https://github.com/jquery/jquery/commit/c864455ccfad13895d2af6ba287f265ee64bd348 and is present in 1.6.1.

Note: See TracTickets for help on using tickets.