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();
- set("checkout_workstation", typeof circs[0].workstation() == 'object' ? circs[0].workstation().name() : circs[0].workstation() );
+ set("checkout_workstation", (typeof circs[0].workstation() == 'object' && circs[0].workstation() != null) ? circs[0].workstation().name() : circs[0].workstation() );
} catch(E) {
alert('Error in alternate_copy_summary.js, FM_CIRC_CHAIN: ' + E);
}
} );
} else {
- set("checkout_workstation", typeof details.circ.workstation() == 'object' ? details.circ.workstation().name() : details.circ.workstation() );
+ set("checkout_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() );
}
set("billings", details.circ.billings());
set("payments", details.circ.payments());