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

Dev fix: The change to set all Ajax properties has a knock on effect on setting deep objects that don't exist, since that is now attempted. Picked up by unit test.

This commit is contained in:
Allan Jardine 2012-04-13 17:56:46 +01:00
parent 814ce1f7d5
commit 9ec52faec5
2 changed files with 8 additions and 0 deletions

View File

@ -866,6 +866,10 @@
for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
{
data = data[ a[i] ];
if ( data === undefined )
{
return;
}
}
data[ a[a.length-1] ] = val;
};

View File

@ -441,6 +441,10 @@ function _fnSetObjectDataFn( mSource )
for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
{
data = data[ a[i] ];
if ( data === undefined )
{
return;
}
}
data[ a[a.length-1] ] = val;
};