Skip to content

Commit

Permalink
fix: cannot read properties of undefined (reading 'handleBlur')
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Nov 13, 2024
1 parent c90b2eb commit dde347e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ export default defineComponent({
nextTick(() => {
setInputValue(innerValue.value);
props.onBlur?.(innerValue.value, { e });
formItem.handleBlur();
formItem?.handleBlur();
});
return;
}

props.onBlur?.(innerValue.value, { e });
formItem.handleBlur();
formItem?.handleBlur();
};

const handleCompositionend = (e: CompositionEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion src/textarea/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default defineComponent({
props.onFocus?.(innerValue.value, { e });
};
const handleBlur = (e: FocusEvent) => {
formItem.handleBlur();
formItem?.handleBlur();
props.onBlur?.(innerValue.value, { e });
};

Expand Down

0 comments on commit dde347e

Please sign in to comment.