defend against the home_ou default not being an allowed location for workstation...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Dec 2009 20:25:33 +0000 (20:25 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Dec 2009 20:25:33 +0000 (20:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15168 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/main/ws_info.xul

index bce872d..0e27a66 100644 (file)
             util.widgets.remove_children( x );
 
             var default_lib = g.my_lib; 
-            if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) {
+            if (typeof g.my_libs_ou_hash[ default_lib ] == 'undefined') {
                 default_lib = null;
+            } else {
+                if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) {
+                    default_lib = null;
+                }
             }
 
             g.ml = util.widgets.make_menulist(