1
1
mirror of https://github.com/primer/css.git synced 2024-11-24 13:15:00 +03:00
This commit is contained in:
Shawn Allen 2018-12-04 22:02:00 -08:00
parent 8cc2a458a8
commit 33c5ad4cee
2 changed files with 1 additions and 5 deletions

View File

@ -99,5 +99,3 @@ function List({items, ...rest}) {
} }
return null return null
} }
function noop() {}

View File

@ -2,7 +2,6 @@ import React from 'react'
import {join} from 'path' import {join} from 'path'
import {withRouter} from 'next/router' import {withRouter} from 'next/router'
import {Box, BorderBox, Flex, Relative} from '@primer/components' import {Box, BorderBox, Flex, Relative} from '@primer/components'
import Link from './Link'
import NodeLink from './NodeLink' import NodeLink from './NodeLink'
import {rootPage} from './utils' import {rootPage} from './utils'
@ -95,7 +94,7 @@ const Router = withRouter(({router, children}) => {
return React.Children.toArray(children).map(child => { return React.Children.toArray(children).map(child => {
if (child.props.path) { if (child.props.path) {
if (!matched && router.pathname.indexOf(child.props.path) === 0) { if (!matched && router.pathname.indexOf(child.props.path) === 0) {
return matched = child return (matched = child)
} }
} else { } else {
return child return child
@ -106,4 +105,3 @@ const Router = withRouter(({router, children}) => {
function RouteMatch({children}) { function RouteMatch({children}) {
return children return children
} }