Browse Source

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

Vanessa 1 year ago
parent
commit
ccff6efc98
1 changed files with 1 additions and 1 deletions
  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());
     }
 };