Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Prevent extra whitespace in NavigationAccordion for pages with no hea…
Browse files Browse the repository at this point in the history
…dings (#44)

* only create div for secondary items if the array length > 0

* add changelog entry
  • Loading branch information
colleenmcginnis authored Aug 13, 2018
1 parent 710e346 commit a51bfb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Master

- Prevent an empty array from being passed to `secondLevelItems` in `NavigationAccordion`. ([#44](https://github.com/mapbox/dr-ui/pull/44))
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NavigationAccordion extends React.PureComponent {
);
}
let renderedSecondLevelContent = '';
if (isActive && secondLevelContent) {
if (isActive && secondLevelContent && secondLevelContent.length > 0) {
renderedSecondLevelContent = (
<div className="ml24 pt0">
<ul className="txt-m pb12 inline-block-mm none unprose">
Expand Down

0 comments on commit a51bfb7

Please sign in to comment.