mirror of
https://github.com/primer/css.git
synced 2024-11-24 05:06:04 +03:00
strip trailing slash from router.pathname
This commit is contained in:
parent
c54c4b691f
commit
aff3f32b0c
@ -43,7 +43,8 @@ export default class MyApp extends App {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {pathname} = this.props.router
|
||||
// strip the trailing slash
|
||||
const pathname = this.props.router.pathname.replace(/\/$/, '')
|
||||
const filename = pathMap[pathname]
|
||||
const {Component, page} = this.props
|
||||
const hasHero = ['/css', '/css/'].includes(pathname)
|
||||
|
Loading…
Reference in New Issue
Block a user