checkin
authorBill Erickson <berick@esilibrary.com>
Tue, 24 Jun 2014 21:36:29 +0000 (17:36 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 24 Jun 2014 21:36:29 +0000 (17:36 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index c027820..04a8262 100644 (file)
@@ -342,9 +342,10 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) {
 
     // fetches the full list of copy statuses
     service.flesh_copy_status = function(copy) {
+        if (!copy) return $q.when();
         if (egCore.env.ccs) 
             return $q.when(copy.status(egCore.env.ccs.map[copy.status()]));
-        return egCore.pcrud.retrieveAll('ccs', {}, {atomic : true}
+        return egCore.pcrud.retrieveAll('ccs', {}, {atomic : true}).then(
             function(list) {
                 egCore.env.absorbList(list, 'ccs');
                 copy.status(egCore.env.ccs.map[copy.status()]);