Skip to content

Commit

Permalink
fix(Documentation): Fixes anonymous function argument (#196)
Browse files Browse the repository at this point in the history
The argument name `string` in an anonymous filter callback conflicts with the string type declaration, preventing the styleguide from building.
  • Loading branch information
burnumd authored Apr 15, 2019
1 parent cf94cf2 commit 4a3c110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const HeaderComponent: React.SFC<HeaderProps & React.HTMLAttributes<HTMLDivEleme
const mainContentAnchor = 'main-content'
if (mainContentUrl.indexOf(anchorCharacter) >= 0) {
// Split on any anchors and filter them out
const [baseUrl, ...params] = mainContentUrl.split(/\s?(#[a-zA-Z0-9-]+)/).filter(string => !string.startsWith(anchorCharacter));
const [baseUrl, ...params] = mainContentUrl.split(/\s?(#[a-zA-Z0-9-]+)/).filter(section => !section.startsWith(anchorCharacter));
// Rejoin the URL with our anchor and any params
mainContentUrl = [baseUrl, `${anchorCharacter}${mainContentAnchor}`, ...params].join('');
} else {
Expand Down

0 comments on commit 4a3c110

Please sign in to comment.