Skip to content

Commit 24e7c2c

Browse files
authored
Update Options.jsx (#316)
这个组件并没有current状态(可能某个版本删去了),对应的逻辑应该重新调整,更符合实际情况。
1 parent 59f5599 commit 24e7c2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Options.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class Options extends React.Component {
1212
};
1313

1414
getValidValue() {
15-
const { goInputText, current } = this.state;
15+
const { goInputText } = this.state;
1616
// eslint-disable-next-line no-restricted-globals
17-
return !goInputText || isNaN(goInputText) ? current : Number(goInputText);
17+
return !goInputText || isNaN(goInputText) ? undefined : Number(goInputText);
1818
}
1919

2020
buildOptionText = (value) => `${value} ${this.props.locale.items_per_page}`;

0 commit comments

Comments
 (0)