Merge "jquery.tablesorter: Never initialize twice on the same element"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 19 Mar 2019 20:09:14 +0000 (20:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 19 Mar 2019 20:09:14 +0000 (20:09 +0000)
resources/src/jquery.tablesorter/jquery.tablesorter.js

index b73f430..c1b83fd 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;