Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: In _fnExtend there was a bug where a variable referenced a 'loca…

…lly global' (for lack of a better term) variable rather than the in function variable that it should be have. Got away with this since _fnExtend is only used for one thing at the moment, but it was wrong. Now fixed.

Update - Performance / Memory: The functions that DataTables uses are not instance based, they are locally scoped, but they were included in the DataTable constructore, which meant that every time you create a new 'instance' of DataTables ($().dataTable()) it would create these functions in that scope again and again. That's completely pointless since we only need them once, so moving them outside the constructor helps both performance and memory (not huge, but very little helps!).
  • Loading branch information...
commit ab454c1c335eeb9e83353eb87fbc84482af2274d 1 parent ec10497
@DataTables authored
View
8,113 media/js/jquery.dataTables.js
4,056 additions, 4,057 deletions not shown
View
31 media/src/DataTables.js
@@ -45,6 +45,21 @@
"use strict";
require('core.compat.js');
+ require('core.columns.js');
+ require('core.data.js');
+ require('core.draw.js');
+ require('core.ajax.js');
+ require('core.filter.js');
+ require('core.info.js');
+ require('core.init.js');
+ require('core.length.js');
+ require('core.page.js');
+ require('core.processing.js');
+ require('core.scrolling.js');
+ require('core.sizing.js');
+ require('core.sort.js');
+ require('core.state.js');
+ require('core.support.js');
/**
* DataTables is a plug-in for the jQuery Javascript library. It is a
@@ -80,22 +95,6 @@
*/
var DataTable = function( oInit )
{
- require('core.columns.js');
- require('core.data.js');
- require('core.draw.js');
- require('core.ajax.js');
- require('core.filter.js');
- require('core.info.js');
- require('core.init.js');
- require('core.length.js');
- require('core.page.js');
- require('core.processing.js');
- require('core.scrolling.js');
- require('core.sizing.js');
- require('core.sort.js');
- require('core.state.js');
- require('core.support.js');
-
require('api.methods.js');
require('api.internal.js');
View
2  media/src/core/core.support.js
@@ -175,7 +175,7 @@ function _fnExtend( oOut, oExtender )
{
val = oExtender[prop];
- if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
+ if ( typeof oExtender[prop] === 'object' && val !== null && $.isArray(val) === false )
{
$.extend( true, oOut[prop], val );
}
Please sign in to comment.
Something went wrong with that request. Please try again.