🐛 修复特定情况下的渲染异常

This commit is contained in:
目棃
2024-08-31 12:39:34 +08:00
parent 1cc75314bb
commit c682443e6f

View File

@@ -66,6 +66,16 @@ function getParsedData(data: TGApp.Plugins.Mys.SctPost.Base[]): TGApp.Plugins.My
child = [];
}
}
// 可能没有换行符导致res为空
if (res.length === 0) {
cur = {
insert: "",
attributes: tp.attributes,
children: child,
};
res.push(cur);
child = [];
}
}
return res;
}