diff --git a/src/EventSubscriber/WebformCivicrmMigrateSubscriber.php b/src/EventSubscriber/WebformCivicrmMigrateSubscriber.php index a24d8b5..5d59b4c 100644 --- a/src/EventSubscriber/WebformCivicrmMigrateSubscriber.php +++ b/src/EventSubscriber/WebformCivicrmMigrateSubscriber.php @@ -454,6 +454,12 @@ public function migrateWebform(\Drupal\migrate\Row $row) { # Fields come in as a yaml string - convert to Array then $data = $this->getWebformCiviCRMSettings($row); + // If no CiviCRM data then we can skip this form as it doesn't + // have any CiviCRM components. + if (empty($data)) { + return; + } + $elements = WebformYaml::decode($row->get('elements')); $root_elements = WebformCivicrmMigrateSubscriber::getChildren($elements);