Skip to content

Commit

Permalink
Fix to hide empty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
laryn committed Dec 1, 2016
1 parent c7b3bea commit 778d37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expanding_formatter.module
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function expanding_formatter_field_formatter_settings_summary($field, $instance,
* Implements hook_field_formatter_view().
*/
function expanding_formatter_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
if ($display['type'] === 'expanding_formatter_text_trimmed' || $display['type'] === 'expanding_formatter_text_summary_or_trimmed') {
if (($items && $display['type'] === 'expanding_formatter_text_trimmed' || $display['type'] === 'expanding_formatter_text_summary_or_trimmed')) {
// Get the settings and extend default ones that don't exist.
$settings = $display['settings'];
$settings += expanding_formatter_default_settings();
Expand Down

0 comments on commit 778d37a

Please sign in to comment.