Skip to content

Commit b5ab14d

Browse files
committed
fix: formitem error when use native tag #4383
close #4383
1 parent bea5df1 commit b5ab14d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/form/FormItem.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export default defineComponent({
306306
const children = flattenChildren(slots.default?.());
307307
let firstChildren = children[0];
308308
if (fieldName.value && props.autoLink && isValidElement(firstChildren)) {
309-
const originalEvents = firstChildren.props;
309+
const originalEvents = firstChildren.props || {};
310310
const originalBlur = originalEvents.onBlur;
311311
const originalChange = originalEvents.onChange;
312312
firstChildren = cloneElement(firstChildren, {

0 commit comments

Comments
 (0)