Skip to content

Commit

Permalink
fix($last-updated): doesn't work due to internal api change
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Oct 15, 2018
1 parent eaaa25c commit b8ce22c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@vuepress/plugin-last-updated/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const spawn = require('cross-spawn')

module.exports = (options = {}, context) => ({
extendPageData ({ _filePath }) {
extendPageData ($page) {
const { transformer } = options
const timestamp = getGitLastUpdatedTimeStamp(_filePath)
const timestamp = getGitLastUpdatedTimeStamp($page._filePath)
const lastUpdated = typeof transformer === 'function' ? transformer(timestamp) : timestamp
return { lastUpdated }
$page.lastUpdated = lastUpdated
}
})

Expand Down

0 comments on commit b8ce22c

Please sign in to comment.