Skip to content

Commit b56903a

Browse files
Fix missing check for empty array in breadcrumbs
Co-Authored-By: Kyle Durand <kyledurand@users.noreply.github.com>
1 parent 52c117c commit b56903a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.changeset/twelve-grapes-reply.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@shopify/polaris': minor
33
---
44

5-
Adds the ability for breadcrumbs to be passed as a singular object instead of an array to allow support for upcoming v11 changes
5+
Added the ability for breadcrumbs to be passed as a singular object instead of an array to allow support for upcoming v11 changes

polaris-react/src/components/Page/components/Header/Header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ export function Header({
9898
!actionGroups.length;
9999

100100
const breadcrumbMarkup =
101-
(Array.isArray(breadcrumbs) && breadcrumbs.length > 0) || breadcrumbs ? (
101+
(Array.isArray(breadcrumbs) && breadcrumbs.length > 0) ||
102+
(!Array.isArray(breadcrumbs) && breadcrumbs) ? (
102103
<div className={styles.BreadcrumbWrapper}>
103104
<Breadcrumbs breadcrumbs={breadcrumbs} />
104105
</div>

0 commit comments

Comments
 (0)