Skip to content

Commit

Permalink
refactor: Revert to previous behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 15, 2025
1 parent c3a7a4c commit be151aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/seoelements/SeoEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,11 @@ public static function typeMenuFromHandle(string $sourceHandle): array
$section = self::sourceModelFromHandle($sourceHandle);
if ($section !== null) {
$entryTypes = $section->getEntryTypes();
foreach ($entryTypes as $entryType) {
$typeMenu[$entryType->id] = $entryType->name;
// Only create a menu if there's more than 1 entry type
if (count($entryTypes) > 1) {
foreach ($entryTypes as $entryType) {
$typeMenu[$entryType->id] = $entryType->name;
}
}
}

Expand Down

0 comments on commit be151aa

Please sign in to comment.