Fix javascript error (cannot join null)
authorColeman Watts <coleman@civicrm.org>
Sun, 27 Dec 2015 01:18:22 +0000 (20:18 -0500)
committerColeman Watts <coleman@civicrm.org>
Sun, 27 Dec 2015 01:18:22 +0000 (20:18 -0500)
templates/CRM/Event/Form/Participant.tpl

index dbba237f4ed5be70f4b7fb6ccab4e60e5c99ea4a..c37ce5f6583b89a44ae34710bfc6f937283581ff 100644 (file)
         });
 
         function buildRoleCustomData() {
-          var roleId = $('select[name^=role_id]', $form).val().join();
-          CRM.buildCustomData('Participant', roleId, {/literal}{$roleCustomDataTypeID}{literal});
+          var roleId = $('select[name^=role_id]', $form).val() || [];
+          CRM.buildCustomData('Participant', roleId.join(), {/literal}{$roleCustomDataTypeID}{literal});
         }
 
         //build fee block