Bug Tracker

Modify

Ticket #9126 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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 3 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:2 Changed 3 years ago by timmywil

#9241 is a duplicate of this ticket.

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

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

comment:5 Changed 3 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.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.