jquery.tablesorter: Never initialize twice on the same element
authorEd Sanders <esanders@wikimedia.org>
Wed, 13 Mar 2019 19:26:05 +0000 (19:26 +0000)
committerEd Sanders <esanders@wikimedia.org>
Tue, 19 Mar 2019 18:49:51 +0000 (18:49 +0000)
Change-Id: I06725e62b2ee95e2d1d37348a633f9cbc156318d

resources/src/jquery.tablesorter/jquery.tablesorter.js

index 6107af1..74873c4 100644 (file)
                                        $table = $( table ),
                                        firstTime = true;
 
+                               // Don't construct twice on the same table
+                               if ( $.data( table, 'tablesorter' ) ) {
+                                       return;
+                               }
                                // Quit if no tbody
                                if ( !table.tBodies ) {
                                        return;