Changes to $.data illogical in certain case
|Reported by:||antti.kumpulainen@…||Owned by:||dmethvin|
This applies to all browsers and version 1.6 only.
I have a test case to reproduce the error.
I'm expecting that if I use .data('foo-bar') I get the data from 'foo-bar' or 'fooBar', but NOT "randomly".
Currently if .data('foo-bar', 'something') is called, after that .data('foo-bar') returns something even if fooBar has a value.
There are two solutions:
a) Do not return camel cased version with .data('foo-bar').
b) When setting .data('foo-bar', 'something'), set the camel cased version and not the actual 'foo-bar'.
Change History (4)
comment:1 Changed 5 years ago by dmethvin
- Component changed from unfiled to data
- Milestone changed from 1.next to 1.6.1
- Owner set to dmethvin
- Priority changed from undecided to blocker
- Status changed from new to assigned
comment:2 Changed 5 years ago by John Resig
- Resolution set to fixed
- Status changed from assigned to closed