From 4d6c714a0c0c51b62d48f8aaacaf9c46f927d09b Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Wed, 2 Mar 2016 08:12:24 -0600 Subject: [PATCH] Core: Add debug warning when widget is added more than once --- js/jquery.tablesorter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 90503e5f..d77791a9 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1848,6 +1848,9 @@ ███████▀ ██ █████▀ ▀████▀ ██████ ██ █████▀ */ addWidget : function( widget ) { + if ( widget.id && !ts.isEmptyObject( ts.getWidgetById( widget.id ) ) ) { + console.warn( '"' + widget.id + '" widget was loaded more than once!' ); + } ts.widgets[ ts.widgets.length ] = widget; },