Skip to content

Commit

Permalink
Fix #4092 PDF reload at file change
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Dec 13, 2023
1 parent 7980d3b commit 7457501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preview/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export { serializer } from './viewer/pdfviewerpanel'
export { hook } from './viewer/pdfviewerhook'

lw.watcher.pdf.onChange(pdfPath => {
if (lw.compile.compiling && path.relative(lw.compile.compiledPDFPath, pdfPath) !== '') {
if (!lw.compile.compiling || path.relative(lw.compile.compiledPDFPath, pdfPath) !== '') {
refresh(pdfPath)
}
})
Expand Down

0 comments on commit 7457501

Please sign in to comment.