Skip to content

Commit e96b59c

Browse files
Kieran Osgoodapollonian
authored andcommitted
Fix bug with otp codes starting with zero being stripped
1 parent d99f728 commit e96b59c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class OtpInput extends Component<Props, State> {
139139
handleOtpChange = (otp: string[]) => {
140140
const { onChange, isInputNum } = this.props;
141141
const otpValue = otp.join('');
142-
onChange(isInputNum ? Number(otpValue) : otpValue);
142+
onChange(otpValue);
143143
};
144144

145145
// Focus on input by index

0 commit comments

Comments
 (0)