Skip to content

Commit e442d51

Browse files
committed
修复可选链操作符兼容性问题(#33)
1 parent e8f3d15 commit e442d51

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: 18
17+
node-version: 22
1818
registry-url: https://registry.npmjs.org/
1919
- run: npm publish
2020
env:

layout/common/header.pug

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
header.logo-env
44
.logo
55
a(href=url_for('/index.html')).logo-expanded
6-
img(src=url_for(setting.logo?.expanded), width='100%', alt='')
6+
img(src=url_for(setting.logo ? setting.logo.expanded : ''), width='100%', alt='')
77
a(href=url_for('/index.html')).logo-collapsed
8-
img(src=url_for(setting.logo?.collapsed), width='40', alt='')
8+
img(src=url_for(setting.logo ? setting.logo.collapsed : ''), width='40', alt='')
99
.mobile-menu-toggle.visible-xs
10-
a(href='#', data-toggle='user-info-menu')
10+
a(href='javascript:void(0)', data-toggle='user-info-menu')
1111
i.linecons-cog
12-
a(href='#', data-toggle='mobile-menu')
12+
a(href='javascript:void(0)', data-toggle='mobile-menu')
1313
i.fas.fa-bars
1414
ul#main-menu.main-menu
1515
each e in setting.menu
@@ -33,7 +33,7 @@
3333
a(href=url_for(setting.about.url))
3434
i(class=setting.about.icon)
3535
span.tooltip-blue= setting.about.name
36-
if setting.busuanzi.enable && setting.busuanzi.position === 'sidebar'
36+
if setting.busuanzi && setting.busuanzi.enable && setting.busuanzi.position === 'sidebar'
3737
li
3838
a(href='javascript:void(0)')
3939
i.fas.fa-eye

layout/index.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ body.page-body
6969
each subMenu in e.submenu
7070
- const childPath = page.path.replace('index.html', '') + subMenu.config
7171
- const key = isChildPage ? childPath : subMenu.config
72-
- var menus = site.data?.[key] || menuSetting[subMenu.config] || []
72+
- var menus = site.data ? site.data[key] : (menuSetting[subMenu.config] || [])
7373
include common/group
7474
else
7575
- const childPath = page.path.replace('index.html', '') + e.config
7676
- const key = isChildPage ? childPath : e.config
77-
- var menus = site.data?.[key] || menuSetting[e.config] || []
77+
- var menus = site.data ? site.data[key] : (menuSetting[e.config] || [])
7878
include common/group
7979

8080
if setting.js && setting.js.footer

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hexo-theme-webstack",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"description": "A hexo theme based on webstack.",
55
"keywords": [
66
"hexo",

0 commit comments

Comments
 (0)