Skip to main content

Bug Tracker

Side navigation

#14684 closed bug (notabug)

Opened January 09, 2014 04:00PM UTC

Closed January 09, 2014 04:05PM UTC

Data creates new object

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.2
Keywords: Cc:
Blocked by: Blocking:

var a={};
console.log(a==$(document).data()); // returns false, expected: true, BUG?!

var a={};
console.log(a==$(document).data('a')); // returns true, expected: true, OK
Attachments (0)
Change History (1)

Changed January 09, 2014 04:05PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

There is no API for setting the entirety of the data. You're using an API for setting multiple individual properties, of which you're setting none.