From 30a437d80e038c81302c554d24ba3302a46d8643 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 10 Nov 2011 08:15:03 +0000 Subject: [PATCH] Fix: fnUpdate recursion would cause an error if dealing with nested arrays - 7292. Fix is to let the function know, with a private variable, that it is being called recursively. --- media/js/jquery.dataTables.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 405c5a4d..5a0fd491 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -1930,25 +1930,30 @@ var iRow = (typeof mRow == 'object') ? _fnNodeToDataIndex(oSettings, mRow) : mRow; - if ( $.isArray(mData) && typeof mData == 'object' ) + if ( typeof oSettings.__fnUpdateDeep == 'undefined' && $.isArray(mData) && typeof mData == 'object' ) { /* Array update - update the whole row */ oSettings.aoData[iRow]._aData = mData.slice(); - + + /* Flag to the function that we are recursing */ + oSettings.__fnUpdateDeep = true; for ( i=0 ; i