LP#1477677 - fix JS TypeError that prevents stat cats from displaying in stat cat...
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 1 Jun 2015 23:16:25 +0000 (16:16 -0700)
committerBen Shum <bshum@biblio.org>
Thu, 23 Jul 2015 17:53:21 +0000 (13:53 -0400)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js

index 32bffae..acfbaff 100644 (file)
@@ -211,7 +211,7 @@ function scInsertCat( tbody, cat, type ) {
     else 
         unHideMe($n(row, 'sc_opac_invisible'));
 
-    if(cat.sip_field().length != 2)
+    if(cat.sip_field() !== null && cat.sip_field().length != 2)
         unHideMe($n(row, 'sc_sip_field_none'));
     else {
         $n(row, 'sc_sip_field_value').appendChild( text( cat.sip_field() ) );