Skip to content

Commit c3ffbfa

Browse files
committed
fix:
missing sidebar button on a mobile homepage fix vuejs#1355
1 parent a30f6fa commit c3ffbfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/default-theme/Layout.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,14 @@ export default {
9898
const { frontmatter } = this.$page
9999
return (
100100
!frontmatter.layout &&
101-
!frontmatter.home &&
102101
frontmatter.sidebar !== false &&
103-
this.sidebarItems.length
102+
(this.sidebarItems.length || frontmatter.home)
104103
)
105104
},
106105
107106
sidebarItems () {
107+
const { frontmatter } = this.$page
108+
if (frontmatter.home) return []
108109
return resolveSidebarItems(
109110
this.$page,
110111
this.$route,

0 commit comments

Comments
 (0)