Additional check to see if profileCreate links are empty
authorColeman Watts <coleman@civicrm.org>
Thu, 28 Aug 2014 11:35:37 +0000 (12:35 +0100)
committerColeman Watts <coleman@civicrm.org>
Thu, 28 Aug 2014 11:35:37 +0000 (12:35 +0100)
js/Common.js

index f194ebecd60afffc5f0d9c09860e66719af0f5ca..d24689ebe5ee12378385ededf2ff18d0937563df 100644 (file)
@@ -385,7 +385,7 @@ CRM.strings = CRM.strings || {};
       if ($el.data('create-links') && entity.toLowerCase() === 'contact') {
         selectParams.formatInputTooShort = function() {
           var txt = $el.data('select-params').formatInputTooShort || $.fn.select2.defaults.formatInputTooShort.call(this);
-          if ($el.data('create-links') && CRM.profileCreate) {
+          if ($el.data('create-links') && CRM.profileCreate && CRM.profileCreate.length) {
             txt += ' ' + ts('or') + '<br />' + formatSelect2CreateLinks($el);
           }
           return txt;