Skip to content

Commit

Permalink
guard for document #5541
Browse files Browse the repository at this point in the history
  • Loading branch information
pnowak committed Jan 7, 2019
1 parent 0efb40d commit f60ac06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/dom/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ export function isOutsideInput(element) {
* @param {HTMLElement} element - DOM element
*/
export function checkToFocus(element) {
const activeElement = document.activeElement;
const activeElement = document && document.activeElement;

if (!isOutsideInput(activeElement)) {
element.select();
Expand Down

0 comments on commit f60ac06

Please sign in to comment.