changed arg.array to arg.a to match the fieldmapper stuff..
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 13 Jul 2005 02:39:45 +0000 (02:39 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 13 Jul 2005 02:39:45 +0000 (02:39 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@391 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/JSON.js

index 1abb364..cfd2c1b 100644 (file)
@@ -51,29 +51,29 @@ function js2JSON(arg) {
 
                                if (arg._isfieldmapper) { /* magi-c-ast for fieldmapper objects */
 
-                                       if( arg.array.constructor != Array ) {
+                                       if( arg.a.constructor != Array ) {
                                                var arr = new Array();
-                                               for( var i  = 0; i < arg.array.length; i++ ) {
-                                                       if( arg.array[i] == null ) {
+                                               for( var i  = 0; i < arg.a.length; i++ ) {
+                                                       if( arg.a[i] == null ) {
                                                                arr[i] = null; continue;
                                                        }
 
-                                                       if( typeof arg.array[i] != 'object' ) { 
-                                                               arr[i] = arg.array[i];
+                                                       if( typeof arg.a[i] != 'object' ) { 
+                                                               arr[i] = arg.a[i];
 
-                                                       } else if( typeof arg.array[i] == 'object' 
-                                                                               && arg.array[i]._isfieldmapper) {
+                                                       } else if( typeof arg.a[i] == 'object' 
+                                                                               && arg.a[i]._isfieldmapper) {
 
-                                                               arr[i] = arg.array[i];
+                                                               arr[i] = arg.a[i];
 
                                                        } else {
-                                                               arr[i] = object2Array(arg.array[i]);            
+                                                               arr[i] = object2Array(arg.a[i]);                
                                                        }
                                                }
-                                               arg.array = arr;
+                                               arg.a = arr;
                                        }
 
-                                       return "/*--S " + arg.classname + " --*/" + js2JSON(arg.array) + "/*--E " + arg.classname + " --*/";
+                                       return "/*--S " + arg.classname + " --*/" + js2JSON(arg.a) + "/*--E " + arg.classname + " --*/";
 
                                } else {