Skip to content

Commit 310dff1

Browse files
committed
Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.
(cherry picked from commit 886d6fe)
1 parent 177d0f2 commit 310dff1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ui/jquery.ui.core.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,19 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
252252
});
253253
}
254254

255+
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
256+
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
257+
$.fn.removeData = (function( removeData ) {
258+
return function( key ) {
259+
if ( arguments.length ) {
260+
return removeData.call( this, $.camelCase( key ) );
261+
} else {
262+
return removeData.call( this );
263+
}
264+
};
265+
})( $.fn.removeData );
266+
}
267+
255268

256269

257270

0 commit comments

Comments
 (0)