mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
Core: prevent addRows error. See #979
This commit is contained in:
parent
3cd026ee05
commit
439034aa5e
@ -971,6 +971,13 @@
|
||||
})
|
||||
.bind('addRows' + c.namespace, function(e, $row, resort, callback) {
|
||||
e.stopPropagation();
|
||||
if ( !$row || !( $row instanceof jQuery ) || $row.closest( 'table' )[ 0 ] !== c.table ) {
|
||||
if ( c.debug ) {
|
||||
console.error( 'addRows method requires a jQuery selector reference to rows that have already ' +
|
||||
'been added to the table' );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
table.isUpdating = true;
|
||||
if (isEmptyObject(c.cache)) {
|
||||
// empty table, do an update instead - fixes #450
|
||||
|
Loading…
Reference in New Issue
Block a user