aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2017-02-28 09:51:59 -0500
committerScott González <scott.gonzalez@gmail.com>2017-02-28 09:51:59 -0500
commit1f2011ece3fe6847874677e9a8210fa202498ccb (patch)
tree81795e085072b55898bbe9411275ac0ee352ff98
parent278d1e1108e6c12d35be9edce2a9efcab1946229 (diff)
downloadjquery-ui-1f2011ece3fe6847874677e9a8210fa202498ccb.tar.gz
jquery-ui-1f2011ece3fe6847874677e9a8210fa202498ccb.zip
Widget: Don't swallow errors in `remove` events
The try/catch was only there to support jQuery <1.6.3, which we no longer support. Ref jquery/jquery#3554
-rw-r--r--ui/widget.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/ui/widget.js b/ui/widget.js
index a3922675f..726f70735 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -32,16 +32,12 @@ $.cleanData = ( function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
- try {
- // Only trigger remove when necessary to save time
- events = $._data( elem, "events" );
- if ( events && events.remove ) {
- $( elem ).triggerHandler( "remove" );
- }
-
- // Http://bugs.jquery.com/ticket/8235
- } catch ( e ) {}
+ // Only trigger remove when necessary to save time
+ events = $._data( elem, "events" );
+ if ( events && events.remove ) {
+ $( elem ).triggerHandler( "remove" );
+ }
}
orig( elems );
};