JSPac code was just checking for the truth of the estimated_wait return,
but the estimated_wait return can be -1 under some circumstances.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
var row = $("myopac_holds_row_" + r.hold.id());
- if(qstats.estimated_wait || myopacShowHoldEstimate) {
+ // A note: estimated_wait may be -1 under some circumstances where it shouldn't be shown.
+ if((qstats.estimated_wait && qstats.estimated_wait > 0) || myopacShowHoldEstimate) {
myopacShowHoldEstimate = true;
if(qstats.estimated_wait) {
// wait is currently returned in seconds, but displayed in days