File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ let initialTouchPosition = {};
5
5
let lastTouchPosition = { } ;
6
6
7
7
export default class SidebarMobile extends React . Component {
8
+ constructor ( props ) {
9
+ super ( props ) ;
10
+
11
+ this . _handleBodyClick = this . _handleBodyClick . bind ( this ) ;
12
+ }
13
+
8
14
render ( ) {
9
15
return (
10
16
< nav
@@ -59,7 +65,7 @@ export default class SidebarMobile extends React.Component {
59
65
60
66
return this . props . sections . map ( section => {
61
67
let active = pathname === section . url || pathname . includes ( `/${ section . url } ` ) ,
62
- absoluteUrl = `/${ section . url } ` ;
68
+ absoluteUrl = ( section . url == '/' ) ? '/' : `/${ section . url } ` ;
63
69
64
70
return (
65
71
< div
@@ -70,7 +76,7 @@ export default class SidebarMobile extends React.Component {
70
76
key = { absoluteUrl }
71
77
to = { absoluteUrl }
72
78
onClick = { this . _close . bind ( this ) } >
73
- < h3 > { section . title } </ h3 >
79
+ < h3 > { section . title || section . url } </ h3 >
74
80
</ Link >
75
81
76
82
{ this . _getPages ( section . pages ) }
@@ -93,7 +99,7 @@ export default class SidebarMobile extends React.Component {
93
99
}
94
100
95
101
return pages . map ( page => {
96
- let url = `/ ${ page . url } ` ,
102
+ let url = `${ page . url } ` ,
97
103
active = pathname === url || pathname . includes ( `${ url } /` ) ;
98
104
99
105
return (
You can’t perform that action at this time.
0 commit comments