Skip to content

Commit 08bdaa3

Browse files
committed
fix: 解决移除数组时,子元素是字符串的问题
1 parent 0c3c62f commit 08bdaa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/setter/array-setter/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class ListSetter extends Component<ArraySetterProps, ArraySetterState> {
147147
i++;
148148
}
149149
removed.remove();
150-
const pureValues = values.map((item: any) => Object.assign({}, item));
150+
const pureValues = values.map((item: any) => typeof(item) === 'object' ? Object.assign({}, item):item);
151151
field?.setValue(pureValues);
152152
this.setState({ items });
153153
}

0 commit comments

Comments
 (0)