Skip to content

Commit

Permalink
Revert "Add little check to fix notice if a block is no more available"
Browse files Browse the repository at this point in the history
This reverts commit 66c9ebd.
  • Loading branch information
jf-viguier committed Aug 31, 2023
1 parent 2d829d8 commit ad76d22
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions classes/PrettyBlocksModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,9 @@ public static function getBlocksAvailable()
$data[0] = $data;
}
foreach ($data as $block) {
if (!empty($block['code'])) {
$blocks[$block['code']] = $block;
// formatted for LeftPanel.vue
$blocks[$block['code']]['formatted'] = self::formatBlock($block);
}
$blocks[$block['code']] = $block;
// formatted for LeftPanel.vue
$blocks[$block['code']]['formatted'] = self::formatBlock($block);
}
}

Expand All @@ -686,7 +684,7 @@ private static function formatBlock($block)
$formatted['icon'] = $block['icon'] ?? 'PhotographIcon';
$formatted['icon_path'] = $block['icon_path'] ?? '';
$formatted['module'] = $block['code']; // todo register module name
$formatted['title'] = $block['name'] ?? '';
$formatted['title'] = $block['name'];
// dump($block);

// if nameFrom params is present
Expand Down

0 comments on commit ad76d22

Please sign in to comment.