From cf9a0d4d979a81a8f95954dfebddf034dbb8a95f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 11 Dec 2013 10:05:18 -0500 Subject: [PATCH] Break out of focus() in cat/z3950.js if obj.active_services is undefined. Signed-off-by: Jason Stephenson Signed-off-by: Ben Shum --- Open-ILS/xul/staff_client/server/cat/z3950.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index 07763b2f79..d140e13d1f 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -495,6 +495,7 @@ cat.z3950.prototype = { 'focus' : function() { var obj = this; var focus_me; var or_focus_me; + if (!obj.active_services) return; for (var i = 0; i < obj.active_services.length; i++) { if (obj.creds.hosts[ obj.data.server_unadorned ] && obj.creds.hosts[ obj.data.server_unadorned ].services[ obj.active_services[i] ]) { var x = obj.creds.hosts[ obj.data.server_unadorned ].services[ obj.active_services[i] ].default_attr; -- 2.11.0