entityRef - Use deep-merge to combine data-params and options
authorColeman Watts <coleman@civicrm.org>
Fri, 16 Oct 2015 02:48:10 +0000 (22:48 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 16 Oct 2015 02:48:10 +0000 (22:48 -0400)
js/Common.js

index e60987d642362843ef29b134d579f7ae85ae17b3..6b6fc03faa46e952930a565cad7c652b63bce3a1 100644 (file)
@@ -421,7 +421,7 @@ CRM.strings = CRM.strings || {};
         selectParams = {};
       $el.data('api-entity', entity);
       $el.data('select-params', $.extend({}, $el.data('select-params') || {}, options.select));
-      $el.data('api-params', $.extend({}, $el.data('api-params') || {}, options.api));
+      $el.data('api-params', $.extend(true, {}, $el.data('api-params') || {}, options.api));
       $el.data('create-links', options.create || $el.data('create-links'));
       $el.addClass('crm-form-entityref crm-' + entity.toLowerCase() + '-ref');
       var settings = {