diff --git a/app/src/protyle/toolbar/util.ts b/app/src/protyle/toolbar/util.ts index f177d7f6a..e49c8f839 100644 --- a/app/src/protyle/toolbar/util.ts +++ b/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()); } };