mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Internal - Small change to the new order() method to remove redundant code
This commit is contained in:
parent
2e278b0285
commit
a077d24e6a
6
media/js/jquery.dataTables.js
vendored
6
media/js/jquery.dataTables.js
vendored
@ -7644,14 +7644,10 @@
|
||||
// Simple column / direction passed in
|
||||
order = [ [ order, dir ] ];
|
||||
}
|
||||
else if ( arguments.length > 1 ) {
|
||||
else if ( ! $.isArray( order[0] ) ) {
|
||||
// Arguments passed in (list of 1D arrays)
|
||||
order = Array.prototype.slice.call( arguments );
|
||||
}
|
||||
else if ( ! $.isArray( order[0] ) ) {
|
||||
// Just a 1D array passed in, convert to 2D to use for sorting
|
||||
order = [ order ];
|
||||
}
|
||||
// otherwise a 2D array was passed in
|
||||
|
||||
return this.tables( function ( settings ) {
|
||||
|
@ -48,14 +48,10 @@ _Api.register( 'order()', function ( order, dir ) {
|
||||
// Simple column / direction passed in
|
||||
order = [ [ order, dir ] ];
|
||||
}
|
||||
else if ( arguments.length > 1 ) {
|
||||
else if ( ! $.isArray( order[0] ) ) {
|
||||
// Arguments passed in (list of 1D arrays)
|
||||
order = Array.prototype.slice.call( arguments );
|
||||
}
|
||||
else if ( ! $.isArray( order[0] ) ) {
|
||||
// Just a 1D array passed in, convert to 2D to use for sorting
|
||||
order = [ order ];
|
||||
}
|
||||
// otherwise a 2D array was passed in
|
||||
|
||||
return this.tables( function ( settings ) {
|
||||
|
Loading…
Reference in New Issue
Block a user