Skip to content

Commit

Permalink
fix: unexpected reload at dev when md contains frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Oct 17, 2018
1 parent 81eef30 commit 54efcb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vuepress/markdown-loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = function (src) {
const cachedData = devCache.get(file)
if (cachedData && (
cachedData.inferredTitle !== inferredTitle ||
JSON.stringify(cachedData.frontmatter) !== JSON.stringify(frontmatter) ||
JSON.stringify(cachedData.frontmatterData) !== JSON.stringify(frontmatter.data) ||
headersChanged(cachedData.headers, headers)
)) {
// frontmatter changed... need to do a full reload
Expand All @@ -59,7 +59,7 @@ module.exports = function (src) {

devCache.set(file, {
headers,
frontmatter,
frontmatterData: frontmatter.data,
inferredTitle
})
}
Expand Down

0 comments on commit 54efcb8

Please sign in to comment.