Skip to content

Commit

Permalink
Fix breadcrumbs interator key
Browse files Browse the repository at this point in the history
  • Loading branch information
ceolson01 committed Jan 15, 2020
1 parent f905763 commit 4dcf807
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/modules/core/components/BreadCrumb/BreadCrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { Fragment } from 'react';
import { injectIntl, IntlShape, MessageDescriptor } from 'react-intl';

import styles from './BreadCrumb.css';
Expand All @@ -22,13 +22,9 @@ const BreadCrumb = ({ elements, intl: { formatMessage } }: Props) => {
const crumbText =
typeof crumb == 'string' ? crumb : formatMessage(crumb);
return (
<>
<Fragment key={`breadCrumb_${crumbText}`}>
{elements.length > 1 && i < elements.length - 1 ? (
<div
className={styles.element}
key={`breadCrumb_${crumbText}`}
title={crumbText}
>
<div className={styles.element} title={crumbText}>
<span className={styles.breadCrumble}>{crumbText}</span>
<span className={styles.arrow}>&gt;</span>
</div>
Expand All @@ -38,7 +34,7 @@ const BreadCrumb = ({ elements, intl: { formatMessage } }: Props) => {
<b className={styles.breadCrumble}>{crumbText}</b>
</div>
) : null}
</>
</Fragment>
);
})}
</div>
Expand Down

0 comments on commit 4dcf807

Please sign in to comment.