protecting against null org settings
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Mar 2008 20:37:23 +0000 (20:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Mar 2008 20:37:23 +0000 (20:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@8861 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/org_utils.js

index 3426bfb..d00b7b3 100644 (file)
@@ -6,7 +6,7 @@ function fetchOrgSettingDefault(orgId, name) {
     var req = new Request(FETCH_ORG_SETTING, orgId, name);
     req.send(true);
     var res = req.result();
-    return res.value;
+    return (res) ? res.value : null;
 }
 
 /* takes an org unit or id and return the numeric depth */