From 3e0c165146ab7a8b74bc0abd169a09c418d850e3 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 13 Mar 2019 19:26:05 +0000 Subject: [PATCH] jquery.tablesorter: Never initialize twice on the same element Change-Id: I06725e62b2ee95e2d1d37348a633f9cbc156318d --- resources/src/jquery.tablesorter/jquery.tablesorter.js | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.20.1