1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Dev fix: Fix flatten, which was returning an array rather than an API

instance
This commit is contained in:
Allan Jardine 2013-05-25 08:12:44 +01:00
parent dd36646723
commit 73d36854e3

View File

@ -309,9 +309,11 @@ _Api.prototype = /** @lends DataTables.Api */{
flatten: function ()
{
return this.reduce( function ( a, b ) {
var a = this.reduce( function ( a, b ) {
return a.concat( b );
} );
return new _Api( this.context, a );
},
@ -436,6 +438,7 @@ _Api.prototype = /** @lends DataTables.Api */{
push: _arrayProto.push,
// Does not return an API instance
reduce: _arrayProto.reduce || function ( fn, init )
{
var