From 745750173a0f72bc41d4485830432440cd88237f Mon Sep 17 00:00:00 2001 From: James Yu Date: Wed, 13 Dec 2023 09:01:27 +0000 Subject: [PATCH] Fix #4092 PDF reload at file change --- src/preview/viewer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preview/viewer.ts b/src/preview/viewer.ts index 4f6cd7234..039cfe9fc 100644 --- a/src/preview/viewer.ts +++ b/src/preview/viewer.ts @@ -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) } })