CRM-21294 js error when selecting & unselecting merge contacts
authoreileen <emcnaughton@wikimedia.org>
Thu, 12 Oct 2017 03:04:10 +0000 (16:04 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 12 Oct 2017 03:05:44 +0000 (16:05 +1300)
templates/CRM/Contact/Page/DedupeFind.tpl

index 40a4bb37cd6e4250271b979cf1c771e97cda5496..d4b15678a73009ecbf3648a4e8c4e6e90ac17f2e 100644 (file)
     else {
       var id = [];
       CRM.$(element).each(function() {
-        var sth = CRM.$('input.crm-dedupe-select', this);
-        id.push(CRM.$(sth).prop('name').substr(5));
+        var pnName = CRM.$('input.crm-dedupe-select', this).prop('name');
+        if (pnName !== undefined) {
+          id.push(pnName.substr(5));
+        }
       });
       var is_selected = CRM.$('.crm-dedupe-select-all').prop('checked') ? 1 : 0;
     }