[open-ils-commits] r15512 - trunk/Open-ILS/web/js/dojo/MARC (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 12 10:49:34 EST 2010
Author: miker
Date: 2010-02-12 10:49:32 -0500 (Fri, 12 Feb 2010)
New Revision: 15512
Modified:
trunk/Open-ILS/web/js/dojo/MARC/Field.js
Log:
Addressing https://bugs.launchpad.net/evergreen/+bug/520632 -- not strictly required here, but for(;;) is better form for array access
Modified: trunk/Open-ILS/web/js/dojo/MARC/Field.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-02-12 13:33:05 UTC (rev 15511)
+++ trunk/Open-ILS/web/js/dojo/MARC/Field.js 2010-02-12 15:49:32 UTC (rev 15512)
@@ -68,16 +68,16 @@
args.pos = [ args.pos ];
}
- for (var i in args.code) {
+ for (var i = 0; i < args.code.length; i++) {
var sub_pos = {};
- for (var j in me.subfields) {
+ for (var j = 0; j < me.subfields; j++) {
if (me.subfields[j][0] == args.code[i]) {
if (!sub_pos[args.code[i]]) sub_pos[args.code[j]] = 0;
else sub_pos[args.code[i]]++;
if (args.pos) {
- for (var k in args.pos) {
+ for (var k = 0; k < args.pos.length; k++) {
if (sub_pos[args.code[i]] == args.pos[k]) me.subfields.splice(j,1);
}
} else if (args.match && me.subfields[j][1].match( args.match )) {
More information about the open-ils-commits
mailing list