mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
avoid reading innerText (#21217)
this resolves https://github.com/ant-design/ant-design/issues/21160
This commit is contained in:
parent
7d47413afa
commit
4fa525b8a0
@ -185,7 +185,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
||||
if (!this.buttonNode || autoInsertSpaceInButton === false) {
|
||||
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({
|
||||
|
Loading…
Reference in New Issue
Block a user