Feat: The key in the header template cannot be empty.
This commit is contained in:
parent
5fd8c2c5a4
commit
3a1e2df991
1 changed files with 3 additions and 1 deletions
|
|
@ -319,7 +319,9 @@ export function transformArrayToObject(
|
|||
) {
|
||||
if (!Array.isArray(list)) return {};
|
||||
return list?.reduce<Record<string, any>>((pre, cur) => {
|
||||
pre[cur.key] = cur.value;
|
||||
if (cur.key) {
|
||||
pre[cur.key] = cur.value;
|
||||
}
|
||||
return pre;
|
||||
}, {});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue