fixed typo and repaired boolean test (to be safe) in opac init to enforce user depth...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Mar 2008 02:27:16 +0000 (02:27 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Mar 2008 02:27:16 +0000 (02:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9077 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 96b2e72..def2002 100644 (file)
@@ -36,11 +36,11 @@ function init() {
                        var org = G.user.prefs[PREF_DEF_LOCATION];
                        var depth = G.user.prefs[PREF_DEF_DEPTH];
 
-                       if(!org) org = G.user.ws_ou();
-                       if(!depth) depth = findOrgDepth(org);
+                       if(org == null) org = G.user.ws_ou();
+                       if(depth == null) depth = findOrgDepth(org);
 
                        LOCATION = org;
-                       DEPTH = DEPTH;
+                       DEPTH = depth;
                }
        }