diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2012-10-24 14:12:28 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-10-24 14:12:28 -0400 |
commit | 812c6087ada4a6383fd2e033d04648ec0f6691ea (patch) | |
tree | 806b414454033937a39f40814d367bae367b6dae /src/data.js | |
parent | 2eff7fe72d5e07871c502c8839989c8e2f3f0b25 (diff) | |
download | jquery-812c6087ada4a6383fd2e033d04648ec0f6691ea.tar.gz jquery-812c6087ada4a6383fd2e033d04648ec0f6691ea.zip |
Brute force property removal when removeData([a,b,c]). Fixes #12786
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src/data.js')
-rw-r--r-- | src/data.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/data.js b/src/data.js index 10adec6af..eb682feab 100644 --- a/src/data.js +++ b/src/data.js @@ -136,6 +136,14 @@ function internalRemoveData( elem, name, pvt /* For internal use only */ ){ name = name.split(" "); } } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); } for ( i = 0, l = name.length; i < l; i++ ) { |