mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 01:55:04 -05:00
Fixes #14047 jQuery.data should not miss data-* w/ hyphenated property names
http://bugs.jquery.com/ticket/14047 Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
@@ -113,6 +113,7 @@ Data.prototype = {
|
||||
cache : cache[ key ];
|
||||
},
|
||||
access: function( owner, key, value ) {
|
||||
var stored;
|
||||
// In cases where either:
|
||||
//
|
||||
// 1. No key was specified
|
||||
@@ -126,7 +127,11 @@ Data.prototype = {
|
||||
//
|
||||
if ( key === undefined ||
|
||||
((key && typeof key === "string") && value === undefined) ) {
|
||||
return this.get( owner, key );
|
||||
|
||||
stored = this.get( owner, key );
|
||||
|
||||
return stored !== undefined ?
|
||||
stored : this.get( owner, jQuery.camelCase(key) );
|
||||
}
|
||||
|
||||
// [*]When the key is not a string, or both a key and value
|
||||
|
||||
Reference in New Issue
Block a user