Bug 25728: Don't explode if no CAN_* var defined
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / js / cataloging.js
index 6e0adb0..cc52385 100644 (file)
@@ -89,7 +89,7 @@ var Select2Utils = {
 
     initSelect2: function(selects) {
         if ($.fn.select2) {
-            if ( ! CAN_user_parameters_manage_auth_values ) {
+            if ( window.CAN_user_parameters_manage_auth_values === undefined || ! CAN_user_parameters_manage_auth_values ) {
                 $(selects).select2();
             } else {
                 $(selects).select2({