Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/8097

Vanessaf9d71002fc32
diff --git a/app/src/asset/renderAssets.ts b/app/src/asset/renderAssets.ts
index 7b88edcbad..f7af1eb2bc 100644
--- a/app/src/asset/renderAssets.ts
+++ b/app/src/asset/renderAssets.ts
@@ -32,7 +32,11 @@ export const pdfResize = () => {
if (!pdfDocument) {
return;
}
+ // https://github.com/siyuan-note/siyuan/issues/8097
const pdfViewerElement = item.element.querySelector("#viewerContainer");
+ if (pdfViewerElement.clientHeight === 0) {
+ return;
+ }
if (pdfViewerElement) {
// https://github.com/siyuan-note/siyuan/issues/6890
const scrollTop = pdfViewerElement.getAttribute("data-scrolltop");