Skip to content

Commit

Permalink
fix(archive-plugin): fix git.updateTime is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
xcyeye committed Dec 21, 2021
1 parent ca2582d commit 9bdbd50
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -34,11 +34,17 @@ export default {
let allPageArr = []
let allYearSet = new Set()
new Promise((resolve,reject) => {
newPageArr = pageData.default.filter((pageData) => {
newPageArr = pageData.filter((pageData) => {
let includes = excludes.includes(pageData.path);
let title = pageData.title
//git commit的时间
let updatedTime = pageData.data.git.updatedTime
let updatedTime = ''
try {
updatedTime = pageData.data.git.updatedTime
}catch (e) {
updatedTime = "2021/01/01"
}
if (pageData.data.frontmatter.date !== undefined) {
updatedTime = new Date(pageData.data.frontmatter.date).getTime()
Expand Down

0 comments on commit 9bdbd50

Please sign in to comment.