fix: support number elements in jsx templates
This commit is contained in:
parent
786b2c47d0
commit
b32d2a2d8d
3 changed files with 16 additions and 1 deletions
|
|
@ -22,6 +22,9 @@ const renderElement = (elem: Element): string => {
|
|||
if (elem == null || typeof elem === "boolean") {
|
||||
return "";
|
||||
}
|
||||
if (typeof elem === "number") {
|
||||
return elem.toString();
|
||||
}
|
||||
if (typeof elem === "string") {
|
||||
return escapeHtml(elem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue