From d25b9f86edca15a58f63894a2652e2c7dfcbcdea Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 13 Jul 2005 02:39:45 +0000 Subject: [PATCH] changed arg.array to arg.a to match the fieldmapper stuff.. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@391 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/JSON.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/javascript/JSON.js b/src/javascript/JSON.js index 1abb364..cfd2c1b 100644 --- a/src/javascript/JSON.js +++ b/src/javascript/JSON.js @@ -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 { -- 2.11.0