logic
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 6 May 2005 01:52:52 +0000 (01:52 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 6 May 2005 01:52:52 +0000 (01:52 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@306 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/JSON.js

index 538cd78..27a7594 100644 (file)
@@ -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];