From efad23557ee0ccf37d6a6cfad3783455fcb28c7b Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 11 Nov 2009 21:28:43 +0000
Subject: [PATCH] Patch from Lebbeous Fogle-Weekley to prevent staff client
 exceptions when encounting null workstations on circs in copy details UI

git-svn-id: svn://svn.open-ils.org/ILS/trunk@14873 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
index 54e0e81b64..9485d3dc01 100644
--- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
+++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
@@ -312,7 +312,7 @@ function load_item() {
             set("create_time", details.circ.create_time()); 
             set("workstation", details.circ.workstation()); 
             if (get_bool(details.circ.opac_renewal())||get_bool(details.circ.phone_renewal())||get_bool(details.circ.desk_renewal())) {
-                set("renewal_workstation", typeof details.circ.workstation() == 'object' ? details.circ.workstation().name() : details.circ.workstation() ); 
+                set("renewal_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() ); 
                 network.simple_request('FM_CIRC_CHAIN', [ses(), details.circ.id() ], function(req) { // Tiny race condition between details.circ and circs[circs.length-1] here, but meh :)
                     try {
                         var circs = req.getResultObject();
-- 
2.11.0