Update index.ts

This commit is contained in:
itellyou 2022-01-24 20:14:20 +08:00
parent 28e32b4dae
commit fe2c6571ae
1 changed files with 2 additions and 2 deletions

View File

@ -891,8 +891,8 @@ class TableComponent<V extends TableValue = TableValue>
// 第一次渲染
if (!value) return 'Error value';
if (value.html) {
let table = $(value.html);
if (table.name !== 'table') {
let table: NodeInterface | undefined = $(value.html);
if (table && table.name !== 'table') {
table = table.toArray().find((child) => child.name === 'table');
if (!table) {
value.html = `<table><tr><td>${value.html}</td></tr></table>`;