mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
web/math: display error if katex fails
This commit is contained in:
parent
a31c68fc5d
commit
c14c079d44
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@ class HicliMath extends HTMLElement {
|
|||
})
|
||||
} catch (err) {
|
||||
console.error("Failed to render math", this.#latex, err)
|
||||
const errorNode = document.createElement("span")
|
||||
errorNode.innerText = `Failed to render math: ${err}`
|
||||
errorNode.style.color = "var(--error-color)"
|
||||
this.#root.appendChild(errorNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue