From: erickson Date: Fri, 6 May 2005 01:51:59 +0000 (+0000) Subject: NULL! X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=55e2b887771b82e63b13eaa52c26810dbd56640d;p=opensrf%2Fbjwebb.git NULL! git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@305 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/javascript/JSON.js b/src/javascript/JSON.js index 7a03360..538cd78 100644 --- a/src/javascript/JSON.js +++ b/src/javascript/JSON.js @@ -49,13 +49,19 @@ function js2JSON(arg) { if (arg._isfieldmapper) { /* magi-c-ast for fieldmapper objects */ - var arr = new Array(); if( arg.array.constructor != Array ) { + var arr = new Array(); for( var i = 0; i < arg.array.length; i++ ) { + if( typeof arg.array[i] != 'object' ) { arr[i] = arg.array[i]; - } else if(typeof arg.array[i] == 'object' && arg.array[i]._isfieldmapper) { + + } else if(arg.array[i] != null + && typeof arg.array[i] == 'object' + && arg.array[i]._isfieldmapper) { + arr[i] = arg.array[i]; + } else { arr[i] = object2Array(arg.array[i]); }