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

src/javascript/JSON.js

index 7453b4e..7a03360 100644 (file)
@@ -54,7 +54,7 @@ function js2JSON(arg) {
                                                for( var i  = 0; i < arg.array.length; i++ ) {
                                                        if( typeof arg.array[i] != 'object' ) { 
                                                                arr[i] = arg.array[i];
-                                                       } else if(arg.array[i]._isfieldmapper) {
+                                                       } else if(typeof arg.array[i] == 'object' && arg.array[i]._isfieldmapper) {
                                                                arr[i] = arg.array[i];
                                                        } else {
                                                                arr[i] = object2Array(arg.array[i]);