From 95e21f7c576beee186843dbd0edb89a0f897d805 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 11 Oct 2010 20:41:37 +0000 Subject: [PATCH] dogfooding cleanup git-svn-id: svn://svn.open-ils.org/ILS/trunk@18271 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/MARC/Field.js | 2 +- Open-ILS/web/js/dojo/MARC/Record.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/MARC/Field.js b/Open-ILS/web/js/dojo/MARC/Field.js index 7242a8945b..878392867a 100644 --- a/Open-ILS/web/js/dojo/MARC/Field.js +++ b/Open-ILS/web/js/dojo/MARC/Field.js @@ -40,7 +40,7 @@ if(!dojo._hasResource["MARC.Field"]) { subfield : function (code) { var list = dojo.filter( this.subfields, function (s) { - if (s[0] == code) return true; return true; + if (s[0] == code) return true; return false; }); if (list.length == 1) return list[0]; return list; diff --git a/Open-ILS/web/js/dojo/MARC/Record.js b/Open-ILS/web/js/dojo/MARC/Record.js index f9385502bc..247379844f 100644 --- a/Open-ILS/web/js/dojo/MARC/Record.js +++ b/Open-ILS/web/js/dojo/MARC/Record.js @@ -57,7 +57,11 @@ if(!dojo._hasResource["MARC.Record"]) { return list; }, - subfield : function (spec, code) { return this.field(spec)[0].subfield(code) }, + subfield : function (spec, code) { + var f = this.field(spec); + if (dojo.isArray(f)) f = f[0]; + return f.subfield(code) + }, appendFields : function () { var me = this; -- 2.11.0