Skip to content

Commit

Permalink
Fix(InputItem): this.state.value undefined error (#3044)
Browse files Browse the repository at this point in the history
  • Loading branch information
zack24q authored and doxiaodong committed Feb 19, 2019
1 parent 7006876 commit 6110711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/input-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class InputItem extends React.Component<InputItemProps, any> {
onInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const el = e.target;
const { value: rawVal, selectionEnd: prePos } = el;
const { value: preCtrlVal } = this.state;
const { value: preCtrlVal = '' } = this.state;
const { type } = this.props;

let ctrlValue = rawVal;
Expand Down

0 comments on commit 6110711

Please sign in to comment.