better protection for non-existent hold expire interval setting
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 20:40:38 +0000 (20:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 20:40:38 +0000 (20:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10686 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/holds.js

index 0e44dab..7489737 100644 (file)
@@ -482,11 +482,12 @@ function __holdsDrawWindow() {
 
     var interval = fetchOrgSettingDefault(holdArgs.recipient.home_ou(), 'circ.hold_expire_interval');
     var secs = 0;
-    if(interval)
+    if(interval) {
         secs = interval_to_seconds(interval);
-    var expire = new Date();
-    expire.setTime(expire.getTime() + Number(secs + '000'));
-    dijit.byId('holds_expire_time').setValue(expire);
+        var expire = new Date();
+        expire.setTime(expire.getTime() + Number(secs + '000'));
+        dijit.byId('holds_expire_time').setValue(expire);
+    }
 }
 
 function holdsParseMRFormats(str) {