Skip to content

Commit acad7a3

Browse files
committed
refactor(core): minor tweaks
1 parent 92f13bd commit acad7a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@vuepress/core/src/page/resolvePageDate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const resolvePageDate = ({
5252

5353
const dirname = path.dirname(filePathRelative)
5454

55-
if (dirname) {
55+
if (dirname !== '.') {
5656
const matches = dirname.match(DIRNAME_DATE_RE)
5757
if (matches) {
5858
return formatDateString(

packages/@vuepress/core/src/page/resolvePageLang.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export const resolvePageLang = ({
1616
if (isString(frontmatter.lang) && frontmatter.lang) {
1717
return frontmatter.lang
1818
}
19-
return app.siteData.locales[pathLocale]?.lang ?? app.siteData.lang ?? ''
19+
return app.siteData.locales[pathLocale]?.lang ?? app.siteData.lang
2020
}

0 commit comments

Comments
 (0)