Skip to content

Commit

Permalink
Fixed #15022
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 19, 2024
1 parent 114c19d commit 388c091
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft CMS 5

## Unreleased

- Fixed an error that occurred on the current user’s Profile screen if they didn’t have permission to access the primary site. ([#15022](https://github.com/craftcms/cms/issues/15022))

## 5.1.4 - 2024-05-17

- Improved the performance of element indexes that contained asset thumbnails. ([#14760](https://github.com/craftcms/cms/issues/14760))
Expand Down
7 changes: 2 additions & 5 deletions src/templates/_layouts/components/crumbs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<nav aria-label="{{ 'Breadcrumbs'|t('app') }}">
<ul id="crumb-list">
{% for crumb in crumbs %}
{% set hasMenuItems = crumb.menu is defined and crumb.menu.items is defined %}
{% set hasMenuItems = (crumb.menu.items ?? [])|length %}
{% if hasMenuItems %}
{% set crumb = findCrumb(crumb.menu.items)|merge(crumb) %}
{% endif %}
Expand Down Expand Up @@ -32,7 +32,7 @@
<span>{{ crumb.label ?? crumb.html|raw }}</span>
{% endtag %}

{% if crumb.menu is defined and crumb.menu.items is defined %}
{% if hasMenuItems %}
{% set menuId = crumb.id is defined ? "#{crumb.id}-menu" : "crumb-menu#{random()}" %}
{% set menuLabel = crumb.menu.label ?? null %}
{{ tag('button', {
Expand All @@ -47,9 +47,6 @@
'disclosure-trigger': true,
},
}) }}
{% endif %}

{% if hasMenuItems %}
{{ disclosureMenu(crumb.menu.items, {
id: menuId,
withButton: false,
Expand Down

0 comments on commit 388c091

Please sign in to comment.