diff --git a/src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php b/src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php
index 2bc13aa..bd51680 100644
--- a/src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php
+++ b/src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php
@@ -245,7 +245,10 @@ class BusinessRulesViewsSelection extends PluginBase implements SelectionInterfa
         $form_field = $subform[$child];
         $form_field['widget']['#options'] = $options;
         $html_field_id = explode('-wrapper-', $form_field['#id'])[0];
-
+        // Fix html_field_id if it is empty.
+        if ($html_field_id == "") {
+          continue;
+        }
         // Fix html_field_id last char when it ends with _.
         $html_field_id = substr($child, strlen($child) - 1, 1) == '_' ? $html_field_id . '-' : $html_field_id;
 
