From 84b150e74be48237dc2bb8e99df445515eb0e92b Mon Sep 17 00:00:00 2001 From: dbs Date: Fri, 27 Mar 2009 23:13:34 +0000 Subject: [PATCH] Backport r12478 from trunk - fallback to a default record type if nothing valid turns up git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@12711 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/marcedit.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 118a0ba958..4624a03809 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -987,13 +987,17 @@ function recordType (rec) { for (var t in rec_type) { if (_t.match(rec_type[t].Type) && _b.match(rec_type[t].BLvl)) { document.getElementById('recordTypeLabel').value = t; - _record_type = t; + _record_type = t; return t; } } } catch(E) { alert('FIXME, MARC Editor, recordType: ' + E); } + + // in case we don't have a valid record type ... + _record_type = 'BKS'; + return _record_type; } function toggleFFE () { -- 2.11.0