Feat: The key in the header template cannot be empty.

This commit is contained in:
bill 2025-12-10 16:52:06 +08:00
parent 5fd8c2c5a4
commit 3a1e2df991

View file

@ -319,7 +319,9 @@ export function transformArrayToObject(
) { ) {
if (!Array.isArray(list)) return {}; if (!Array.isArray(list)) return {};
return list?.reduce<Record<string, any>>((pre, cur) => { return list?.reduce<Record<string, any>>((pre, cur) => {
pre[cur.key] = cur.value; if (cur.key) {
pre[cur.key] = cur.value;
}
return pre; return pre;
}, {}); }, {});
} }