Skip to content

Commit

Permalink
Add bailout option if we do not have a CiviCRM element
Browse files Browse the repository at this point in the history
  • Loading branch information
stesi561 committed Nov 23, 2022
1 parent 5db7e68 commit 9f29648
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/EventSubscriber/WebformCivicrmMigrateSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9f29648

Please sign in to comment.