Skip to content

Commit 38d95eb

Browse files
authored
fix file read error in rewrite-local-links.js (#54871)
1 parent 0f83719 commit 38d95eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/content-render/unified/rewrite-local-links.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function logError(file, line, message, title = 'Error') {
4747
}
4848

4949
function getFrontmatterOffset(filePath) {
50+
if (!fs.existsSync(filePath)) return 0
5051
const rawContent = fs.readFileSync(filePath, 'utf-8')
5152
let delimiters = 0
5253
let count = 0

0 commit comments

Comments
 (0)