fix: tree collection target error (#4105)

This commit is contained in:
katherinehhh 2024-04-19 16:29:15 +08:00 committed by GitHub
parent 1bacd00739
commit d24c30a7f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,9 @@ export class TreeCollectionTemplate extends CollectionTemplate {
beforeSubmit(values) {
if (Array.isArray(values?.fields)) {
values?.fields.map((f) => {
f.target = values.name;
if (!f.target) {
f.target = values.name;
}
});
}
},