Opened 7 years ago
Closed 7 years ago
#14684 closed bug (notabug)
Data creates new object
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
http://jsfiddle.net/holden321/Pruj2/
var a={}; $(document).data(a); console.log(a==$(document).data()); // returns false, expected: true, BUG?! var a={}; $(document).data({a:a}); console.log(a==$(document).data('a')); // returns true, expected: true, OK
Note: See
TracTickets for help on using
tickets.
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.