From 7a076746f03382e1da7e6b60dd0779678f6fee8a Mon Sep 17 00:00:00 2001 From: lyg <1543117173@qq.com> Date: 星期六, 15 六月 2024 13:38:06 +0800 Subject: [PATCH] 修复PDF页数获取异常 --- src/main.mjs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main.mjs b/src/main.mjs index 9a44efa..6f0a8eb 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -315,7 +315,7 @@ book.state = `涓嬭浇瀹屾垚`; book.format = ext; book.file = filepath; - book.pages = await getPdfPages(filepath); + book.pages = await getPdfPages(filepath).catch(() => 0); console.log(`涓嬭浇瀹屾垚锛�${filepath}`); return; } -- Gitblit v1.9.1