loader.js: fix JS error on IE

This commit is contained in:
Thomas Gelf 2016-02-29 21:18:46 +01:00
parent 29eedc1d4a
commit 96f50c5dfa
1 changed files with 1 additions and 1 deletions

View File

@ -743,7 +743,7 @@
if (forceFocus && forceFocus.length) {
activeElementPath = this.icinga.utils.getCSSPath($(forceFocus));
} else if (document.activeElement.id === 'search') {
} else if (document.activeElement && document.activeElement.id === 'search') {
activeElementPath = '#search';
} else if (document.activeElement
&& document.activeElement !== document.body