mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-05 05:38:23 +08:00
fix: form submission error
This commit is contained in:
parent
bb5aa17106
commit
859e1e0a04
@ -28,7 +28,7 @@ export function Create(props) {
|
||||
onReset={resolve}
|
||||
onDraft={async (item) => {
|
||||
const values = transform ? {} : item;
|
||||
for (const [sourceKey, targetKey] of Object.entries<string>(transform)) {
|
||||
for (const [sourceKey, targetKey] of Object.entries<string>(transform || {})) {
|
||||
const value = get({ data: item }, sourceKey);
|
||||
set(values, targetKey, value);
|
||||
}
|
||||
@ -38,7 +38,7 @@ export function Create(props) {
|
||||
}}
|
||||
onFinish={async (item) => {
|
||||
const values = transform ? {} : item;
|
||||
for (const [sourceKey, targetKey] of Object.entries<string>(transform)) {
|
||||
for (const [sourceKey, targetKey] of Object.entries<string>(transform || {})) {
|
||||
const value = get({ data: item }, sourceKey);
|
||||
set(values, targetKey, value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user