diff --git a/lib/helpers/ariaAppHider.js b/lib/helpers/ariaAppHider.js index 05b4c128..9903b1e4 100644 --- a/lib/helpers/ariaAppHider.js +++ b/lib/helpers/ariaAppHider.js @@ -1,7 +1,7 @@ var _element = typeof document !== 'undefined' ? document.body : null; function setElement(element) { - if (typeof element === 'string') { + if (typeof document !== 'undefined' && typeof element === 'string') { var el = document.querySelectorAll(element); element = 'length' in el ? el[0] : el; }