Skip to content

Commit

Permalink
fix: formitem error when use native tag #4383
Browse files Browse the repository at this point in the history
close #4383
  • Loading branch information
tangjinzhou committed Jul 17, 2021
1 parent bea5df1 commit b5ab14d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default defineComponent({
const children = flattenChildren(slots.default?.());
let firstChildren = children[0];
if (fieldName.value && props.autoLink && isValidElement(firstChildren)) {
const originalEvents = firstChildren.props;
const originalEvents = firstChildren.props || {};
const originalBlur = originalEvents.onBlur;
const originalChange = originalEvents.onChange;
firstChildren = cloneElement(firstChildren, {
Expand Down

0 comments on commit b5ab14d

Please sign in to comment.