From c5954615bc8cfb7ba718cf17fbb3f5403e229207 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 6 May 2005 01:52:52 +0000 Subject: [PATCH] logic git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@306 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/JSON.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/javascript/JSON.js b/src/javascript/JSON.js index 538cd78..27a7594 100644 --- a/src/javascript/JSON.js +++ b/src/javascript/JSON.js @@ -52,12 +52,14 @@ function js2JSON(arg) { if( arg.array.constructor != Array ) { var arr = new Array(); for( var i = 0; i < arg.array.length; i++ ) { + if( arg.array[i] == null ) { + arr[i] = null; continue; + } if( typeof arg.array[i] != 'object' ) { arr[i] = arg.array[i]; - } else if(arg.array[i] != null - && typeof arg.array[i] == 'object' + } else if( typeof arg.array[i] == 'object' && arg.array[i]._isfieldmapper) { arr[i] = arg.array[i]; -- 2.11.0