From 55e2b887771b82e63b13eaa52c26810dbd56640d Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 6 May 2005 01:51:59 +0000 Subject: [PATCH] NULL! git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@305 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/JSON.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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]); } -- 2.11.0