Skip to content

Commit

Permalink
Hold PDF refresh only when building
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Dec 12, 2023
1 parent ee13477 commit 554c181
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 (path.relative(lw.compile.compiledPDFPath, pdfPath) !== '') {
if (lw.compile.compiling && path.relative(lw.compile.compiledPDFPath, pdfPath) !== '') {
refresh(pdfPath)
}
})
Expand Down

0 comments on commit 554c181

Please sign in to comment.