From: Ed Sanders Date: Wed, 13 Mar 2019 19:26:05 +0000 (+0000) Subject: jquery.tablesorter: Never initialize twice on the same element X-Git-Tag: 1.34.0-rc.0~2468^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=3e0c165146ab7a8b74bc0abd169a09c418d850e3;p=lhc%2Fweb%2Fwiklou.git jquery.tablesorter: Never initialize twice on the same element Change-Id: I06725e62b2ee95e2d1d37348a633f9cbc156318d --- diff --git a/resources/src/jquery.tablesorter/jquery.tablesorter.js b/resources/src/jquery.tablesorter/jquery.tablesorter.js index 6107af1883..74873c4b7a 100644 --- a/resources/src/jquery.tablesorter/jquery.tablesorter.js +++ b/resources/src/jquery.tablesorter/jquery.tablesorter.js @@ -816,6 +816,10 @@ $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;