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

src/javascript/JSON.js

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