From 67e84d921fab932ef7bbac3c2367056364c81e76 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Fri, 9 May 2025 10:00:12 +0800 Subject: [PATCH] Avoid reporting errors when performFind has not been called --- apps/client/src/widgets/find_in_html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/widgets/find_in_html.ts b/apps/client/src/widgets/find_in_html.ts index 4885fda31..e8ae8b5ab 100644 --- a/apps/client/src/widgets/find_in_html.ts +++ b/apps/client/src/widgets/find_in_html.ts @@ -83,7 +83,7 @@ export default class FindInHtml { async findBoxClosed(totalFound: number, currentFound: number) { const $content = await this.parent?.noteContext?.getContentElement(); - if ($content) { + if (typeof $content?.unmark === 'function') { $content.unmark(); } }