mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Fix: null values that were applied to extended object properties were not being correctly applied since typeof null === 'object' - 11180
This commit is contained in:
parent
5311067cd2
commit
45a6d2b505
10
media/js/jquery.dataTables.js
vendored
10
media/js/jquery.dataTables.js
vendored
@ -4716,17 +4716,21 @@
|
||||
*/
|
||||
function _fnExtend( oOut, oExtender )
|
||||
{
|
||||
var val;
|
||||
|
||||
for ( var prop in oExtender )
|
||||
{
|
||||
if ( oExtender.hasOwnProperty(prop) )
|
||||
{
|
||||
if ( typeof oInit[prop] === 'object' && $.isArray(oExtender[prop]) === false )
|
||||
val = oExtender[prop];
|
||||
|
||||
if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
|
||||
{
|
||||
$.extend( true, oOut[prop], oExtender[prop] );
|
||||
$.extend( true, oOut[prop], val );
|
||||
}
|
||||
else
|
||||
{
|
||||
oOut[prop] = oExtender[prop];
|
||||
oOut[prop] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,17 +166,21 @@ function _fnMap( oRet, oSrc, sName, sMappedName )
|
||||
*/
|
||||
function _fnExtend( oOut, oExtender )
|
||||
{
|
||||
var val;
|
||||
|
||||
for ( var prop in oExtender )
|
||||
{
|
||||
if ( oExtender.hasOwnProperty(prop) )
|
||||
{
|
||||
if ( typeof oInit[prop] === 'object' && $.isArray(oExtender[prop]) === false )
|
||||
val = oExtender[prop];
|
||||
|
||||
if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
|
||||
{
|
||||
$.extend( true, oOut[prop], oExtender[prop] );
|
||||
$.extend( true, oOut[prop], val );
|
||||
}
|
||||
else
|
||||
{
|
||||
oOut[prop] = oExtender[prop];
|
||||
oOut[prop] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user