Commit 580d89b8 authored by Vlad Proshin's avatar Vlad Proshin Committed by Vlad Proshin
Browse files

Issue #3285554 by drugan: Notice: Undefined index: family_name

parent fcca5a48
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -26,7 +26,11 @@ class PickupAddressDefaultFormatter extends AddressDefaultFormatter {
  public function viewElements(FieldItemListInterface $items, $langcode) {
    $elements = parent::viewElements($items, $langcode);
    $profile = $items->getEntity();
    $elements[0]['#profile_type'] = $profile->bundle();
    $profile_type = $profile->bundle();
    if ($profile_type !== 'pickup') {
      return $elements;
    }
    $elements[0]['#profile_type'] = $profile_type;
    $manager = \Drupal::entityTypeManager();

    if ($id = $profile->getData('pickup_profile_id')) {