Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Sep 2, 2020
1 parent 5c69cbb commit 5735dff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ export class InputNumber extends Component {
}

if (newValue != null) {
let parsedCurrentValue = (typeof value1 === 'string') ? this.parseValue(currentValue) : currentValue;
let parsedCurrentValue = (typeof currentValue === 'string') ? this.parseValue(currentValue) : currentValue;
return newValue !== parsedCurrentValue;
}

Expand Down Expand Up @@ -689,7 +689,7 @@ export class InputNumber extends Component {
if (newLength === currentLength) {
if (operation === 'insert' || operation === 'delete-back-single')
this.inputEl.setSelectionRange(selectionEnd + 1, selectionEnd + 1);
if (operation === 'range-insert')
else if (operation === 'range-insert')
this.inputEl.setSelectionRange(selectionEnd, selectionEnd);
else if (operation === 'delete-single')
this.inputEl.setSelectionRange(selectionEnd - 1, selectionEnd - 1);
Expand Down

0 comments on commit 5735dff

Please sign in to comment.