check if element exists before reading if it's active
This commit is contained in:
parent
c9dc97298a
commit
20deb3825b
1 changed files with 1 additions and 1 deletions
|
@ -522,7 +522,7 @@ export default class Autocomplete extends React.Component {
|
||||||
|
|
||||||
isInputFocused() {
|
isInputFocused() {
|
||||||
const el = this.refs.input;
|
const el = this.refs.input;
|
||||||
return el.ownerDocument && el === el.ownerDocument.activeElement;
|
return el ? el.ownerDocument && el === el.ownerDocument.activeElement : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleInputClick() {
|
handleInputClick() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue