Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9792 closed bug (duplicate)

data() not saved when using '0' as data and hypernated key

Reported by: radhike123@… Owned by:
Priority: low Milestone: 1.next
Component: data Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

When data is set using $(selector).data('test-data',0), undefined is returned when using $(selector).data('test-data');

Example: -> http://jsfiddle.net/Xmqnf/

This does not occur in jQuery 1.6.1

Change History (5)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfileddata
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

comment:2 Changed 8 years ago by Rick Waldron

Duplicate of #9301.

comment:3 Changed 8 years ago by radhike123@…

Hi, rwaldron, are you sure this is fixed? This behavior is only integer 0 in concern.

See this for example: -> http://jsfiddle.net/PeZad/1/ work perfectly in 1.6.2 and 1.6.1

comment:4 Changed 8 years ago by Rick Waldron

There was a larger concern, that I opened a new ticket for: http://bugs.jquery.com/ticket/9794

comment:5 Changed 8 years ago by radhike123@…

ok, I'll be following the new ticket then...

Thanks..

Note: See TracTickets for help on using tickets.