Skip to content

Commit 6688c86

Browse files
author
reco_luan
committed
fix(vuepress-theme-reco): fix subSidebar invalid
ISSUES CLOSED: #267
1 parent 7665374 commit 6688c86

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ yarn-error.log
33
.idea
44
yarn.lock
55
.DS_Store
6+
.vscode
67
package-lock.json

packages/@vuepress-reco/vuepress-plugin-bulletin-popover/lib/vuepress-plugin-bulletin-popover.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/vuepress-theme-reco/mixins/posts.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,15 @@ export default {
5050

5151
const headers = this.$page.headers || []
5252

53-
return [themeSubSidebar, themeSidebar, pageSubSidebar, pageSidebar].indexOf('auto') > -1 &&
54-
headers.length > 0
53+
if ([pageSubSidebar, pageSidebar].indexOf(false) > -1) {
54+
return false
55+
} else if ([pageSubSidebar, pageSidebar].indexOf('auto') > -1 && headers.length > 0) {
56+
return true
57+
} else if ([themeSubSidebar, themeSidebar].indexOf('auto') > -1 && headers.length > 0) {
58+
return true
59+
} else {
60+
return false
61+
}
5562
}
5663
}
5764
}

0 commit comments

Comments
 (0)