瀏覽代碼

:bug: fix https://github.com/siyuan-note/siyuan/issues/9020

Vanessa 1 年之前
父節點
當前提交
ccff6efc98
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/protyle/toolbar/util.ts

+ 1 - 1
app/src/protyle/toolbar/util.ts

@@ -56,7 +56,7 @@ export const removeSearchMark = (element: HTMLElement) => {
         }
     }
 
-    if (element.getAttribute("data-type").includes("search-mark")) {
+    if ((element.getAttribute("data-type") || "").includes("search-mark")) {
         element.setAttribute("data-type", element.getAttribute("data-type").replace("search-mark", "").trim());
     }
 };