Browse Source

Update IslandoraAltmetricBlock.php

main
Alan Stanley 2 years ago committed by GitHub
parent
commit
ae7a240a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/Plugin/Block/IslandoraAltmetricBlock.php

2
src/Plugin/Block/IslandoraAltmetricBlock.php

@ -83,7 +83,7 @@ final class IslandoraAltmetricBlock extends BlockBase implements ContainerFactor
return []; return [];
} }
$doi_field = $config->get('doi_field') ?? 'field_doi'; $doi_field = $config->get('doi_field') ?? 'field_doi';
$doi = !empty($node->$doi_field->value) ? $node->$doi_field->value : null; $doi = $node->$doi_field->value ?? null;
if (!$doi) { if (!$doi) {
return []; return [];
} }

Loading…
Cancel
Save