瀏覽代碼

:art: https://github.com/siyuan-note/siyuan/issues/13282

Vanessa 7 月之前
父節點
當前提交
24250e4eb3
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/asset/index.ts

+ 3 - 1
app/src/asset/index.ts

@@ -73,7 +73,9 @@ export class Asset extends Model {
         /// #if !MOBILE
         if (typeof pdfId === "string") {
             this.getPdfId(() => {
-                onPageNumberChanged({value: this.pdfPage, pdfInstance: this.pdfObject, id: this.pdfId});
+                if (this.pdfPage) {
+                    onPageNumberChanged({value: this.pdfPage, pdfInstance: this.pdfObject, id: this.pdfId});
+                }
             });
             return;
         }