diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 82c57a8cf..4e28e7b34 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -488,8 +488,11 @@ ${unicode2Emoji(emoji.unicode, true)}`; tempElement.innerHTML = value.replace(//g, "").replace(/<\/mark>/g, ""); tempElement = tempElement.firstElementChild as HTMLDivElement; if (refIsS) { - tempElement.setAttribute("data-subtype", "s"); - tempElement.innerText = range.toString().replace(this.splitChar, ""); + const staticText = range.toString().replace(this.splitChar, "") + if (staticText) { + tempElement.setAttribute("data-subtype", "s"); + tempElement.innerText = staticText; + } } protyle.toolbar.setInlineMark(protyle, "block-ref", "range", { type: "id",