@@ -123,9 +123,9 @@ class Layout extends React.PureComponent {
123
123
124
124
const mainClassnames = classNames ( classes . main , {
125
125
[ `${ classes . mainFixedAppBar } ` ] :
126
- appBarPosition === 'fixed' && ! usingTwoRowAppBar ,
126
+ appBarContent && appBarPosition === 'fixed' && ! usingTwoRowAppBar ,
127
127
[ `${ classes . mainFixedTwoRowAppBar } ` ] :
128
- appBarPosition === 'fixed' && usingTwoRowAppBar ,
128
+ appBarContent && appBarPosition === 'fixed' && usingTwoRowAppBar ,
129
129
[ `${ classes . mainGrow } ` ] : mainGrow && ! usingTwoRowAppBar ,
130
130
[ `${ classes . mainGrowTwoRowAppBar } ` ] : mainGrow && usingTwoRowAppBar ,
131
131
[ `${ classes . mainStickyFooter } ` ] : stickyFooter ,
@@ -180,15 +180,17 @@ class Layout extends React.PureComponent {
180
180
181
181
return (
182
182
< div className = { classes . layout } >
183
- < AppBar
184
- position = { appBarPosition }
185
- toggleLeftDrawer = { this . toggleLeftDrawer }
186
- toggleRightDrawer = { this . toggleRightDrawer }
187
- className = { appBarClassnames }
188
- { ...appBarProps }
189
- >
190
- { appBarContent }
191
- </ AppBar >
183
+ { appBarContent ? (
184
+ < AppBar
185
+ position = { appBarPosition }
186
+ toggleLeftDrawer = { this . toggleLeftDrawer }
187
+ toggleRightDrawer = { this . toggleRightDrawer }
188
+ className = { appBarClassnames }
189
+ { ...appBarProps }
190
+ >
191
+ { appBarContent }
192
+ </ AppBar >
193
+ ) : null }
192
194
{ leftDrawerContent ? (
193
195
< Drawer
194
196
open = { leftDrawerOpen }
0 commit comments