mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-19 17:54:14 +01:00
Dev update: Better fix for flatten()
- Smaller code and works with a mix of scalars and arrays
This commit is contained in:
parent
e5d8a40fc1
commit
292d021217
@ -1 +1 @@
|
|||||||
24c30064ce0ef343caf702b3df0de7b4b96d1d1b
|
7e596c7af207083414e0e88b1199d46f75a102bb
|
||||||
|
9
media/js/jquery.dataTables.js
vendored
9
media/js/jquery.dataTables.js
vendored
@ -6521,13 +6521,8 @@
|
|||||||
|
|
||||||
flatten: function ()
|
flatten: function ()
|
||||||
{
|
{
|
||||||
var a = this.length && $.isArray( this[0] ) ?
|
var a = [];
|
||||||
this.reduce( function ( a, b ) {
|
return new _Api( this.context, a.concat.apply( a, this ) );
|
||||||
return a.concat( b );
|
|
||||||
} ) :
|
|
||||||
this;
|
|
||||||
|
|
||||||
return new _Api( this.context, a );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user