Skip to content

Commit

Permalink
fix: support object setting case
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Oct 31, 2020
1 parent e389aa3 commit 284c166
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/theme-default/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ export default {
const showSidebar = computed(() => {
const { frontmatter } = pageData.value
const { themeConfig } = siteRouteData.value
const ret = (
return (
!frontmatter.home
&& frontmatter.sidebar !== false
&& (Array.isArray(themeConfig.sidebar) && themeConfig.sidebar.length != 0)
&& ((typeof themeConfig.sidebar === 'object') && (Object.keys(themeConfig.sidebar).length != 0)
|| (Array.isArray(themeConfig.sidebar) && themeConfig.sidebar.length != 0))
)
return ret
})
const pageClasses = computed(() => {
Expand Down

0 comments on commit 284c166

Please sign in to comment.