Skip to content

Commit

Permalink
fix (YALB-1566): fix update hook by ensuring content exists (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
nJim authored Sep 29, 2023
1 parent d74aa85 commit e5762a5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public function updateExistingPageMeta() {

$section_storage = $stored_data->data['section_storage'];
if (
$section_storage->getSections()[1]->getLayoutSettings()['label'] == 'Title Section'
!empty($section_storage->getSections()[1])
&& $section_storage->getSections()[1]->getLayoutSettings()['label'] == 'Title Section'
&& $stored_data->data['section_storage']->getContext('entity')->getContextData()->getEntity()->bundle() == 'page') {

$section_storage = $stored_data->data['section_storage'];
Expand Down

0 comments on commit e5762a5

Please sign in to comment.