1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-17 15: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:
Allan Jardine 2013-12-28 17:05:36 +00:00
parent e5d8a40fc1
commit 292d021217
2 changed files with 3 additions and 8 deletions

View File

@ -1 +1 @@
24c30064ce0ef343caf702b3df0de7b4b96d1d1b
7e596c7af207083414e0e88b1199d46f75a102bb

View File

@ -6521,13 +6521,8 @@
flatten: function ()
{
var a = this.length && $.isArray( this[0] ) ?
this.reduce( function ( a, b ) {
return a.concat( b );
} ) :
this;
return new _Api( this.context, a );
var a = [];
return new _Api( this.context, a.concat.apply( a, this ) );
},