Skip to content

Commit

Permalink
chore(YSP-689): fix null error on views
Browse files Browse the repository at this point in the history
  • Loading branch information
dblanken-yale committed Sep 30, 2024
1 parent 654d673 commit 489c9d5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,12 @@ public function getView($type, $params) {
// This ensures that if the options for showing categories, tags,
// or thumbnails change, the cache will be invalidated,
// and the view will be re-rendered with the new options.
foreach ($view['#rows']['#rows'] as &$resultRow) {
$resultRow['#cache']['keys'][] = $field_display_options['show_categories'];
$resultRow['#cache']['keys'][] = $field_display_options['show_tags'];
$resultRow['#cache']['keys'][] = $field_display_options['show_thumbnail'];
if ($view['#rows'] && $view['#rows']['#rows']) {
foreach ($view['#rows']['#rows'] as &$resultRow) {
$resultRow['#cache']['keys'][] = $field_display_options['show_categories'];
$resultRow['#cache']['keys'][] = $field_display_options['show_tags'];
$resultRow['#cache']['keys'][] = $field_display_options['show_thumbnail'];
}
}
break;

Expand Down

0 comments on commit 489c9d5

Please sign in to comment.