mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: Prevent setting "all" value before initialization. See #1196
This commit is contained in:
parent
e8b68272e2
commit
1846199b77
@ -783,7 +783,7 @@
|
||||
// set to either set or get value
|
||||
parsePageSize = function( p, size, mode ) {
|
||||
var s = parseInt( size, 10 ) || p.size || p.settings.size || 10;
|
||||
return /all/i.test( size ) || s === p.totalRows ?
|
||||
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
||||
// "get" to get `p.size` or "set" to set `p.$size.val()`
|
||||
'all' : ( mode === 'get' ? s : p.size );
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-pager.min.js
vendored
2
dist/js/widgets/widget-pager.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1115,7 +1115,7 @@
|
||||
parsePageSize: function( c, size, mode ) {
|
||||
var p = c.pager,
|
||||
s = parseInt( size, 10 ) || p.size || c.widgetOptions.pager_size || 10;
|
||||
return /all/i.test( size ) || s === p.totalRows ?
|
||||
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
||||
// "get" to set `p.size` or "set" to set `p.$size.val()`
|
||||
'all' : ( mode === 'get' ? s : p.size );
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user