Skip to content

Commit 886d6fe

Browse files
committed
Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.
1 parent 8a32c39 commit 886d6fe

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
@@ -230,6 +230,19 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
230230
});
231231
}
232232

233+
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
234+
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
235+
$.fn.removeData = (function( removeData ) {
236+
return function( key ) {
237+
if ( arguments.length ) {
238+
return removeData.call( this, $.camelCase( key ) );
239+
} else {
240+
return removeData.call( this );
241+
}
242+
};
243+
})( $.fn.removeData );
244+
}
245+
233246

234247

235248

0 commit comments

Comments
 (0)