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
.
[code]
if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
{
$.extend( true, oOut[prop], val );
}
else
{
oOut[prop] = val;
}
[/code]

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.

Replies

  • allanallan Posts: 61,654Questions: 1Answers: 10,094 Site admin
    The function has changed in git, and this should already be fixed by this commit: https://github.com/DataTables/DataTables/commit/2928326 .

    Allan
This discussion has been closed.