Low-level error in 1.9.4 _fnExtend?

Low-level error in 1.9.4 _fnExtend?

psmerdpsmerd Posts: 9Questions: 0Answers: 0
edited March 2013 in Bug reports
In using jquery.lint, it flagged _fnExtend as passing an invalid argument list to $.extend. Specifically, argument 2 is null.
The code in question is in datatables 1.9.4 around line 4772
if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
$.extend( true, oOut[prop], val );
oOut[prop] = val;

By inspection, it appears the test is incorrect: it should be checking typeof oOut[prop] === 'object' instead of checking oInit[prop]

When I changed the code from typeof oInit[prop] === 'object' to typeof oOut[prop] === 'object', the page did not appear to behave properly (nothing was emitted). When I changed the code to typeof oInit[prop] === 'object' && typeof oOut[prop] === 'object', the table appeared and the jquery.lint warning disappeared.


  • allanallan Posts: 56,819Questions: 1Answers: 9,029 Site admin
    The function has changed in git, and this should already be fixed by this commit: https://github.com/DataTables/DataTables/commit/2928326 .

This discussion has been closed.