Skip to content

Commit

Permalink
avoid reading innerText (#21217)
Browse files Browse the repository at this point in the history
this resolves #21160
  • Loading branch information
rinick authored and afc163 committed Feb 24, 2020
1 parent bb335bc commit e85ec40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
if (!this.buttonNode) {
return;
}
const buttonText = this.buttonNode.textContent || this.buttonNode.innerText;
const buttonText = this.buttonNode.textContent;
if (this.isNeedInserted() && isTwoCNChar(buttonText)) {
if (!this.state.hasTwoCNChar) {
this.setState({
Expand Down

0 comments on commit e85ec40

Please sign in to comment.