fixed: 素材为空时的报错
This commit is contained in:
parent
ee0651fa36
commit
ac0ab41dcb
@ -69,8 +69,8 @@ function groupHasImageAndText(blocks: BlockContent[]) {
|
||||
// 验证分组数据是否合法
|
||||
function checkGroupsValid(groups: BlockContent[][]) {
|
||||
if (groups.length == 1) return true;
|
||||
for (const group of groups) {
|
||||
if(!groupHasImageAndText(group)) return false;
|
||||
for (let index = 1;index< groups.length; index ++) {
|
||||
if(!groupHasImageAndText(groups[index])) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user