webstaff: fix bug in MARC21.Field.deleteSubfield()
authorGalen Charlton <gmc@esilibrary.com>
Mon, 31 Aug 2015 22:06:23 +0000 (22:06 +0000)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:17 +0000 (15:44 -0400)
Bug had the effect of ensuring that... subfields would
not be deleted.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/marcrecord.js

index 7c3f525..2f03706 100644 (file)
@@ -613,7 +613,7 @@ var MARC21 = {
 
             for (var i = 0; i < args.code.length; i++) {
                 var sub_pos = {};
-                for (var j = 0; j < me.subfields; j++) {
+                for (var j = 0; j < me.subfields.length; j++) {
                     if (me.subfields[j][0] == args.code[i]) {
 
                         if (!sub_pos[args.code[i]]) sub_pos[args.code[j]] = 0;